summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrimiano Tucci <primiano@google.com>2014-09-30 14:46:37 +0100
committerPrimiano Tucci <primiano@google.com>2014-09-30 14:46:37 +0100
commite44e544db989d3a2981f06411728c8aa0c6e93bc (patch)
tree8c54d3753557a2aaa4573d9808ebde41c109243d
parent1c06171c343686c4db1bfb561c5c86d057a773f1 (diff)
parentdb1e40e5746058ca5a1cffbb68150b3e8b3e4339 (diff)
downloadwebrtc-e44e544db989d3a2981f06411728c8aa0c6e93bc.tar.gz
Merge from Chromium at DEPS revision 267aeeb8d85c
This commit was generated by merge_to_master.py. Change-Id: I64db0e7da49b895ed7379626b7d7abbe995d21f0
-rw-r--r--BUILD.gn23
-rw-r--r--base/BUILD.gn140
-rw-r--r--base/OWNERS12
-rw-r--r--base/asynchttprequest_unittest.cc13
-rw-r--r--base/autodetectproxy_unittest.cc11
-rw-r--r--base/base.gyp102
-rw-r--r--base/base_tests.gyp252
-rw-r--r--base/checks.cc124
-rw-r--r--base/checks.h208
-rw-r--r--base/cpumonitor_unittest.cc3
-rw-r--r--base/criticalsection.h23
-rw-r--r--base/criticalsection_unittest.cc5
-rw-r--r--base/filelock_unittest.cc3
-rw-r--r--base/flags.cc15
-rw-r--r--base/gunit.h2
-rw-r--r--base/httpclient.cc21
-rw-r--r--base/httpcommon.cc4
-rw-r--r--base/ifaddrs-android.cc2
-rw-r--r--base/ipaddress.cc35
-rw-r--r--base/ipaddress.h61
-rw-r--r--base/ipaddress_unittest.cc37
-rw-r--r--base/logging_unittest.cc3
-rw-r--r--base/maccocoathreadhelper.mm8
-rw-r--r--base/macsocketserver_unittest.cc54
-rw-r--r--base/messagequeue_unittest.cc3
-rw-r--r--base/nat_unittest.cc11
-rw-r--r--base/network.cc113
-rw-r--r--base/network.h40
-rw-r--r--base/network_unittest.cc79
-rw-r--r--base/nssstreamadapter.cc2
-rw-r--r--base/nullsocketserver_unittest.cc3
-rw-r--r--base/opensslidentity.cc12
-rw-r--r--base/opensslstreamadapter.cc21
-rw-r--r--base/physicalsocketserver_unittest.cc13
-rw-r--r--base/proxy_unittest.cc7
-rw-r--r--base/rtc_base.target.darwin-arm.mk374
-rw-r--r--base/rtc_base.target.darwin-arm64.mk344
-rw-r--r--base/rtc_base.target.darwin-mips.mk358
-rw-r--r--base/rtc_base.target.darwin-x86.mk356
-rw-r--r--base/rtc_base.target.darwin-x86_64.mk354
-rw-r--r--base/rtc_base.target.linux-arm.mk374
-rw-r--r--base/rtc_base.target.linux-arm64.mk344
-rw-r--r--base/rtc_base.target.linux-mips.mk358
-rw-r--r--base/rtc_base.target.linux-x86.mk356
-rw-r--r--base/rtc_base.target.linux-x86_64.mk354
-rw-r--r--base/rtc_base_approved.target.darwin-arm.mk296
-rw-r--r--base/rtc_base_approved.target.darwin-arm64.mk266
-rw-r--r--base/rtc_base_approved.target.darwin-mips.mk280
-rw-r--r--base/rtc_base_approved.target.darwin-x86.mk278
-rw-r--r--base/rtc_base_approved.target.darwin-x86_64.mk276
-rw-r--r--base/rtc_base_approved.target.linux-arm.mk296
-rw-r--r--base/rtc_base_approved.target.linux-arm64.mk266
-rw-r--r--base/rtc_base_approved.target.linux-mips.mk280
-rw-r--r--base/rtc_base_approved.target.linux-x86.mk278
-rw-r--r--base/rtc_base_approved.target.linux-x86_64.mk276
-rw-r--r--base/sharedexclusivelock.h25
-rw-r--r--base/sharedexclusivelock_unittest.cc7
-rw-r--r--base/signalthread.h7
-rw-r--r--base/signalthread_unittest.cc11
-rw-r--r--base/socketadapters.cc4
-rw-r--r--base/socketadapters.h4
-rw-r--r--base/socketaddress.cc6
-rw-r--r--base/ssladapter_unittest.cc342
-rw-r--r--base/sslstreamadapter.h12
-rw-r--r--base/sslstreamadapter_unittest.cc3
-rw-r--r--base/stream_unittest.cc3
-rw-r--r--base/stringencode.cc41
-rw-r--r--base/stringencode.h6
-rw-r--r--base/stringutils.cc8
-rw-r--r--base/systeminfo.cc2
-rw-r--r--base/task_unittest.cc15
-rw-r--r--base/testclient_unittest.cc9
-rw-r--r--base/thread.cc96
-rw-r--r--base/thread.h45
-rw-r--r--base/thread_annotations.h (renamed from system_wrappers/interface/thread_annotations.h)0
-rw-r--r--base/thread_checker_unittest.cc15
-rw-r--r--base/thread_unittest.cc105
-rw-r--r--base/timeutils.cc14
-rw-r--r--base/urlencode.cc12
-rw-r--r--base/virtualsocket_unittest.cc59
-rw-r--r--base/virtualsocketserver.cc4
-rw-r--r--base/virtualsocketserver.h3
-rw-r--r--base/webrtc_base.target.darwin-arm.mk412
-rw-r--r--base/webrtc_base.target.darwin-arm64.mk374
-rw-r--r--base/webrtc_base.target.darwin-mips.mk396
-rw-r--r--base/webrtc_base.target.darwin-x86.mk390
-rw-r--r--base/webrtc_base.target.darwin-x86_64.mk388
-rw-r--r--base/webrtc_base.target.linux-arm.mk412
-rw-r--r--base/webrtc_base.target.linux-arm64.mk374
-rw-r--r--base/webrtc_base.target.linux-mips.mk396
-rw-r--r--base/webrtc_base.target.linux-x86.mk390
-rw-r--r--base/webrtc_base.target.linux-x86_64.mk388
-rw-r--r--base/window.h1
-rw-r--r--build/OWNERS2
-rw-r--r--build/apk_tests.gyp30
-rw-r--r--build/common.gypi25
-rw-r--r--build/merge_libs.gyp4
-rw-r--r--build/merge_libs_voice.gyp48
-rw-r--r--build/sanitizer_options.gyp59
-rw-r--r--build/tsan_suppressions_webrtc.cc (renamed from build/tsan_suppressions.cc)19
-rw-r--r--build/webrtc.gni88
-rw-r--r--call.h9
-rw-r--r--common_audio/BUILD.gn197
-rw-r--r--common_audio/common_audio.gyp17
-rw-r--r--common_audio/common_audio.target.darwin-arm.mk68
-rw-r--r--common_audio/common_audio.target.darwin-arm64.mk52
-rw-r--r--common_audio/common_audio.target.darwin-mips.mk60
-rw-r--r--common_audio/common_audio.target.darwin-x86.mk56
-rw-r--r--common_audio/common_audio.target.darwin-x86_64.mk56
-rw-r--r--common_audio/common_audio.target.linux-arm.mk68
-rw-r--r--common_audio/common_audio.target.linux-arm64.mk52
-rw-r--r--common_audio/common_audio.target.linux-mips.mk60
-rw-r--r--common_audio/common_audio.target.linux-x86.mk56
-rw-r--r--common_audio/common_audio.target.linux-x86_64.mk56
-rw-r--r--common_audio/common_audio_neon.target.darwin-arm.mk68
-rw-r--r--common_audio/common_audio_neon.target.linux-arm.mk68
-rw-r--r--common_audio/common_audio_sse2.target.darwin-x86.mk56
-rw-r--r--common_audio/common_audio_sse2.target.darwin-x86_64.mk56
-rw-r--r--common_audio/common_audio_sse2.target.linux-x86.mk56
-rw-r--r--common_audio/common_audio_sse2.target.linux-x86_64.mk56
-rw-r--r--common_audio/fir_filter.cc2
-rw-r--r--common_audio/fir_filter_sse.cc4
-rw-r--r--common_audio/include/audio_util.h2
-rw-r--r--common_audio/resampler/Android.mk47
-rw-r--r--common_audio/resampler/sinc_resampler.cc40
-rw-r--r--common_audio/resampler/sinc_resampler_sse.cc6
-rw-r--r--common_audio/signal_processing/Android.mk126
-rw-r--r--common_audio/signal_processing/auto_corr_to_refl_coef.c6
-rw-r--r--common_audio/signal_processing/copy_set_operations.c40
-rw-r--r--common_audio/signal_processing/get_scaling_square.c8
-rw-r--r--common_audio/signal_processing/include/signal_processing_library.h60
-rw-r--r--common_audio/signal_processing/include/spl_inl.h94
-rw-r--r--common_audio/signal_processing/include/spl_inl_armv7.h17
-rw-r--r--common_audio/signal_processing/include/spl_inl_mips.h14
-rw-r--r--common_audio/signal_processing/resample_by_2.c8
-rw-r--r--common_audio/signal_processing/resample_by_2_mips.c4
-rw-r--r--common_audio/signal_processing/signal_processing_unittest.cc27
-rw-r--r--common_audio/signal_processing/splitting_filter.c4
-rw-r--r--common_audio/signal_processing/vector_scaling_operations.c2
-rw-r--r--common_audio/vad/Android.mk51
-rw-r--r--common_audio/wav_writer.cc48
-rw-r--r--common_audio/wav_writer.h11
-rw-r--r--common_audio/wav_writer_unittest.cc21
-rw-r--r--common_video/BUILD.gn8
-rw-r--r--common_video/OWNERS1
-rw-r--r--common_video/common_video.target.darwin-arm.mk68
-rw-r--r--common_video/common_video.target.darwin-arm64.mk52
-rw-r--r--common_video/common_video.target.darwin-mips.mk60
-rw-r--r--common_video/common_video.target.darwin-x86.mk56
-rw-r--r--common_video/common_video.target.darwin-x86_64.mk56
-rw-r--r--common_video/common_video.target.linux-arm.mk68
-rw-r--r--common_video/common_video.target.linux-arm64.mk52
-rw-r--r--common_video/common_video.target.linux-mips.mk60
-rw-r--r--common_video/common_video.target.linux-x86.mk56
-rw-r--r--common_video/common_video.target.linux-x86_64.mk56
-rw-r--r--common_video/common_video_unittests.gyp8
-rw-r--r--common_video/interface/i420_video_frame.h146
-rw-r--r--common_video/interface/video_image.h59
-rw-r--r--common_video/libyuv/Android.mk42
-rw-r--r--config.h14
-rw-r--r--examples/OWNERS3
-rw-r--r--examples/android/OWNERS1
-rw-r--r--examples/android/media_demo/jni/on_load.cc15
-rw-r--r--examples/android/opensl_loopback/src/org/webrtc/app/OpenSlDemo.java6
-rw-r--r--libjingle/xmllite/OWNERS13
-rw-r--r--libjingle/xmllite/qname.cc78
-rw-r--r--libjingle/xmllite/qname.h83
-rw-r--r--libjingle/xmllite/qname_unittest.cc114
-rw-r--r--libjingle/xmllite/rtc_xmllite.target.darwin-arm.mk311
-rw-r--r--libjingle/xmllite/rtc_xmllite.target.darwin-arm64.mk281
-rw-r--r--libjingle/xmllite/rtc_xmllite.target.darwin-mips.mk295
-rw-r--r--libjingle/xmllite/rtc_xmllite.target.darwin-x86.mk293
-rw-r--r--libjingle/xmllite/rtc_xmllite.target.darwin-x86_64.mk291
-rw-r--r--libjingle/xmllite/rtc_xmllite.target.linux-arm.mk311
-rw-r--r--libjingle/xmllite/rtc_xmllite.target.linux-arm64.mk281
-rw-r--r--libjingle/xmllite/rtc_xmllite.target.linux-mips.mk295
-rw-r--r--libjingle/xmllite/rtc_xmllite.target.linux-x86.mk293
-rw-r--r--libjingle/xmllite/rtc_xmllite.target.linux-x86_64.mk291
-rw-r--r--libjingle/xmllite/xmlbuilder.cc130
-rw-r--r--libjingle/xmllite/xmlbuilder.h61
-rw-r--r--libjingle/xmllite/xmlbuilder_unittest.cc177
-rw-r--r--libjingle/xmllite/xmlconstants.cc25
-rw-r--r--libjingle/xmllite/xmlconstants.h30
-rw-r--r--libjingle/xmllite/xmlelement.cc496
-rw-r--r--libjingle/xmllite/xmlelement.h234
-rw-r--r--libjingle/xmllite/xmlelement_unittest.cc258
-rw-r--r--libjingle/xmllite/xmllite.gyp40
-rw-r--r--libjingle/xmllite/xmllite_tests.gyp34
-rw-r--r--libjingle/xmllite/xmlnsstack.cc178
-rw-r--r--libjingle/xmllite/xmlnsstack.h45
-rw-r--r--libjingle/xmllite/xmlnsstack_unittest.cc241
-rw-r--r--libjingle/xmllite/xmlparser.cc261
-rw-r--r--libjingle/xmllite/xmlparser.h103
-rw-r--r--libjingle/xmllite/xmlparser_unittest.cc285
-rw-r--r--libjingle/xmllite/xmlprinter.cc174
-rw-r--r--libjingle/xmllite/xmlprinter.h32
-rw-r--r--libjingle/xmllite/xmlprinter_unittest.cc45
-rw-r--r--modules/CNG.target.darwin-arm.mk68
-rw-r--r--modules/CNG.target.darwin-arm64.mk52
-rw-r--r--modules/CNG.target.darwin-mips.mk60
-rw-r--r--modules/CNG.target.darwin-x86.mk56
-rw-r--r--modules/CNG.target.darwin-x86_64.mk56
-rw-r--r--modules/CNG.target.linux-arm.mk68
-rw-r--r--modules/CNG.target.linux-arm64.mk52
-rw-r--r--modules/CNG.target.linux-mips.mk60
-rw-r--r--modules/CNG.target.linux-x86.mk56
-rw-r--r--modules/CNG.target.linux-x86_64.mk56
-rw-r--r--modules/G711.target.darwin-arm.mk68
-rw-r--r--modules/G711.target.darwin-arm64.mk52
-rw-r--r--modules/G711.target.darwin-mips.mk60
-rw-r--r--modules/G711.target.darwin-x86.mk56
-rw-r--r--modules/G711.target.darwin-x86_64.mk56
-rw-r--r--modules/G711.target.linux-arm.mk68
-rw-r--r--modules/G711.target.linux-arm64.mk52
-rw-r--r--modules/G711.target.linux-mips.mk60
-rw-r--r--modules/G711.target.linux-x86.mk56
-rw-r--r--modules/G711.target.linux-x86_64.mk56
-rw-r--r--modules/G722.target.darwin-arm.mk68
-rw-r--r--modules/G722.target.darwin-arm64.mk52
-rw-r--r--modules/G722.target.darwin-mips.mk60
-rw-r--r--modules/G722.target.darwin-x86.mk56
-rw-r--r--modules/G722.target.darwin-x86_64.mk56
-rw-r--r--modules/G722.target.linux-arm.mk68
-rw-r--r--modules/G722.target.linux-arm64.mk52
-rw-r--r--modules/G722.target.linux-mips.mk60
-rw-r--r--modules/G722.target.linux-x86.mk56
-rw-r--r--modules/G722.target.linux-x86_64.mk56
-rw-r--r--modules/PCM16B.target.darwin-arm.mk68
-rw-r--r--modules/PCM16B.target.darwin-arm64.mk52
-rw-r--r--modules/PCM16B.target.darwin-mips.mk60
-rw-r--r--modules/PCM16B.target.darwin-x86.mk56
-rw-r--r--modules/PCM16B.target.darwin-x86_64.mk56
-rw-r--r--modules/PCM16B.target.linux-arm.mk68
-rw-r--r--modules/PCM16B.target.linux-arm64.mk52
-rw-r--r--modules/PCM16B.target.linux-mips.mk60
-rw-r--r--modules/PCM16B.target.linux-x86.mk56
-rw-r--r--modules/PCM16B.target.linux-x86_64.mk56
-rw-r--r--modules/audio_coding/BUILD.gn672
-rw-r--r--modules/audio_coding/codecs/OWNERS1
-rw-r--r--modules/audio_coding/codecs/cng/Android.mk40
-rw-r--r--modules/audio_coding/codecs/cng/cng_helpfuns.c2
-rw-r--r--modules/audio_coding/codecs/cng/cng_helpfuns.h2
-rw-r--r--modules/audio_coding/codecs/cng/cng_unittest.cc2
-rw-r--r--modules/audio_coding/codecs/cng/include/webrtc_cng.h2
-rw-r--r--modules/audio_coding/codecs/g711/Android.mk40
-rw-r--r--modules/audio_coding/codecs/g711/g711.c2
-rw-r--r--modules/audio_coding/codecs/g711/g711.h2
-rw-r--r--modules/audio_coding/codecs/g711/g711_interface.c2
-rw-r--r--modules/audio_coding/codecs/g711/include/g711_interface.h2
-rw-r--r--modules/audio_coding/codecs/g722/Android.mk40
-rw-r--r--modules/audio_coding/codecs/g722/g722_decode.c5
-rw-r--r--modules/audio_coding/codecs/g722/g722_enc_dec.h2
-rw-r--r--modules/audio_coding/codecs/g722/g722_encode.c4
-rw-r--r--modules/audio_coding/codecs/g722/g722_interface.c5
-rw-r--r--modules/audio_coding/codecs/g722/include/g722_interface.h2
-rw-r--r--modules/audio_coding/codecs/g722/test/testG722.cc2
-rw-r--r--modules/audio_coding/codecs/ilbc/Android.mk165
-rw-r--r--modules/audio_coding/codecs/ilbc/constants.h2
-rw-r--r--modules/audio_coding/codecs/ilbc/defines.h4
-rw-r--r--modules/audio_coding/codecs/ilbc/interface/ilbc.h2
-rw-r--r--modules/audio_coding/codecs/ilbc/vq3.h2
-rw-r--r--modules/audio_coding/codecs/ilbc/vq4.h2
-rw-r--r--modules/audio_coding/codecs/isac/fix/interface/isacfix.h5
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/Android.mk152
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/arith_routines_logist.c4
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/bandwidth_estimator.c39
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/decode.c17
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/decode_bwe.c2
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/decode_plc.c12
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/entropy_coding.c10
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/entropy_coding_mips.c4
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/filterbank_internal.h2
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/filterbank_tables.h2
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/filterbanks.c16
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/filterbanks_neon.S64
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/filterbanks_unittest.cc2
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/filters.c7
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/filters_unittest.cc2
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/isacfix.c41
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/isacfix.gypi9
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/lattice_c.c2
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/lpc_masking_model_unittest.cc2
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/lpc_tables.h3
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c5
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c4
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.h3
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.h4
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.h3
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/structs.h6
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/transform_unittest.cc2
-rw-r--r--modules/audio_coding/codecs/isac/fix/test/isac_speed_test.cc2
-rw-r--r--modules/audio_coding/codecs/isac/fix/test/kenny.cc2
-rw-r--r--modules/audio_coding/codecs/isac/fix/test/test_iSACfixfloat.c9
-rw-r--r--modules/audio_coding/codecs/isac/main/interface/isac.h2
-rw-r--r--modules/audio_coding/codecs/isac/main/source/Android.mk66
-rw-r--r--modules/audio_coding/codecs/isac/main/source/crc.h2
-rw-r--r--modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.c14
-rw-r--r--modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.h3
-rw-r--r--modules/audio_coding/codecs/isac/main/source/filter_functions.c1
-rw-r--r--modules/audio_coding/codecs/isac/main/source/isac.c41
-rw-r--r--modules/audio_coding/codecs/isac/main/source/isac_unittest.cc2
-rw-r--r--modules/audio_coding/codecs/isac/main/source/lattice.c1
-rw-r--r--modules/audio_coding/codecs/isac/main/source/lpc_gain_swb_tables.c2
-rw-r--r--modules/audio_coding/codecs/isac/main/source/lpc_gain_swb_tables.h2
-rw-r--r--modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.c2
-rw-r--r--modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.h2
-rw-r--r--modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.c2
-rw-r--r--modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.h3
-rw-r--r--modules/audio_coding/codecs/isac/main/source/os_specific_inline.h2
-rw-r--r--modules/audio_coding/codecs/isac/main/source/pitch_estimator.c1
-rw-r--r--modules/audio_coding/codecs/isac/main/source/pitch_gain_tables.h2
-rw-r--r--modules/audio_coding/codecs/isac/main/source/pitch_lag_tables.h2
-rw-r--r--modules/audio_coding/codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc4
-rw-r--r--modules/audio_coding/codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc3
-rw-r--r--modules/audio_coding/codecs/isac/main/test/simpleKenny.c6
-rw-r--r--modules/audio_coding/codecs/opus/interface/opus_interface.h28
-rw-r--r--modules/audio_coding/codecs/opus/opus_interface.c10
-rw-r--r--modules/audio_coding/codecs/opus/opus_unittest.cc31
-rw-r--r--modules/audio_coding/codecs/pcm16b/Android.mk37
-rw-r--r--modules/audio_coding/codecs/pcm16b/include/pcm16b.h22
-rw-r--r--modules/audio_coding/codecs/pcm16b/pcm16b.c23
-rw-r--r--modules/audio_coding/codecs/tools/audio_codec_speed_tests.gypi8
-rw-r--r--modules/audio_coding/main/acm2/acm_amr.cc10
-rw-r--r--modules/audio_coding/main/acm2/acm_amr.h2
-rw-r--r--modules/audio_coding/main/acm2/acm_amrwb.cc9
-rw-r--r--modules/audio_coding/main/acm2/acm_amrwb.h2
-rw-r--r--modules/audio_coding/main/acm2/acm_celt.cc11
-rw-r--r--modules/audio_coding/main/acm2/acm_celt.h2
-rw-r--r--modules/audio_coding/main/acm2/acm_cng.cc7
-rw-r--r--modules/audio_coding/main/acm2/acm_cng.h2
-rw-r--r--modules/audio_coding/main/acm2/acm_dtmf_playout.cc9
-rw-r--r--modules/audio_coding/main/acm2/acm_dtmf_playout.h2
-rw-r--r--modules/audio_coding/main/acm2/acm_g722.cc9
-rw-r--r--modules/audio_coding/main/acm2/acm_g722.h4
-rw-r--r--modules/audio_coding/main/acm2/acm_g7221.cc9
-rw-r--r--modules/audio_coding/main/acm2/acm_g7221.h2
-rw-r--r--modules/audio_coding/main/acm2/acm_g7221c.cc9
-rw-r--r--modules/audio_coding/main/acm2/acm_g7221c.h2
-rw-r--r--modules/audio_coding/main/acm2/acm_g729.cc9
-rw-r--r--modules/audio_coding/main/acm2/acm_g729.h2
-rw-r--r--modules/audio_coding/main/acm2/acm_g7291.cc9
-rw-r--r--modules/audio_coding/main/acm2/acm_g7291.h2
-rw-r--r--modules/audio_coding/main/acm2/acm_generic_codec.cc11
-rw-r--r--modules/audio_coding/main/acm2/acm_generic_codec.h46
-rw-r--r--modules/audio_coding/main/acm2/acm_gsmfr.cc11
-rw-r--r--modules/audio_coding/main/acm2/acm_gsmfr.h2
-rw-r--r--modules/audio_coding/main/acm2/acm_ilbc.cc9
-rw-r--r--modules/audio_coding/main/acm2/acm_ilbc.h2
-rw-r--r--modules/audio_coding/main/acm2/acm_isac.cc16
-rw-r--r--modules/audio_coding/main/acm2/acm_isac.h4
-rw-r--r--modules/audio_coding/main/acm2/acm_opus.cc27
-rw-r--r--modules/audio_coding/main/acm2/acm_opus.h5
-rw-r--r--modules/audio_coding/main/acm2/acm_opus_unittest.cc2
-rw-r--r--modules/audio_coding/main/acm2/acm_pcm16b.cc7
-rw-r--r--modules/audio_coding/main/acm2/acm_pcm16b.h2
-rw-r--r--modules/audio_coding/main/acm2/acm_pcma.cc5
-rw-r--r--modules/audio_coding/main/acm2/acm_pcma.h2
-rw-r--r--modules/audio_coding/main/acm2/acm_pcmu.cc4
-rw-r--r--modules/audio_coding/main/acm2/acm_pcmu.h2
-rw-r--r--modules/audio_coding/main/acm2/acm_receive_test.cc181
-rw-r--r--modules/audio_coding/main/acm2/acm_receive_test.h19
-rw-r--r--modules/audio_coding/main/acm2/acm_receive_test_oldapi.cc187
-rw-r--r--modules/audio_coding/main/acm2/acm_receive_test_oldapi.h63
-rw-r--r--modules/audio_coding/main/acm2/acm_receiver.h2
-rw-r--r--modules/audio_coding/main/acm2/acm_receiver_unittest.cc42
-rw-r--r--modules/audio_coding/main/acm2/acm_receiver_unittest_oldapi.cc364
-rw-r--r--modules/audio_coding/main/acm2/acm_red.cc4
-rw-r--r--modules/audio_coding/main/acm2/acm_red.h2
-rw-r--r--modules/audio_coding/main/acm2/acm_send_test.cc30
-rw-r--r--modules/audio_coding/main/acm2/acm_send_test.h8
-rw-r--r--modules/audio_coding/main/acm2/acm_send_test_oldapi.cc145
-rw-r--r--modules/audio_coding/main/acm2/acm_send_test_oldapi.h86
-rw-r--r--modules/audio_coding/main/acm2/acm_speex.cc9
-rw-r--r--modules/audio_coding/main/acm2/acm_speex.h2
-rw-r--r--modules/audio_coding/main/acm2/audio_coding_module.cc4
-rw-r--r--modules/audio_coding/main/acm2/audio_coding_module.gypi12
-rw-r--r--modules/audio_coding/main/acm2/audio_coding_module_impl.cc282
-rw-r--r--modules/audio_coding/main/acm2/audio_coding_module_impl.h229
-rw-r--r--modules/audio_coding/main/acm2/audio_coding_module_unittest.cc317
-rw-r--r--modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc938
-rw-r--r--modules/audio_coding/main/acm2/call_statistics_unittest.cc2
-rw-r--r--modules/audio_coding/main/acm2/initial_delay_manager_unittest.cc2
-rw-r--r--modules/audio_coding/main/acm2/nack_unittest.cc2
-rw-r--r--modules/audio_coding/main/interface/audio_coding_module.h196
-rw-r--r--modules/audio_coding/main/test/ACMTest.h2
-rw-r--r--modules/audio_coding/main/test/Channel.h9
-rw-r--r--modules/audio_coding/main/test/EncodeDecodeTest.h11
-rw-r--r--modules/audio_coding/main/test/PCMFile.cc4
-rw-r--r--modules/audio_coding/main/test/RTPFile.cc7
-rw-r--r--modules/audio_coding/main/test/RTPFile.h24
-rw-r--r--modules/audio_coding/main/test/TestAllCodecs.cc2
-rw-r--r--modules/audio_coding/main/test/TestAllCodecs.h11
-rw-r--r--modules/audio_coding/main/test/TestStereo.cc2
-rw-r--r--modules/audio_coding/main/test/TestStereo.h15
-rw-r--r--modules/audio_coding/main/test/TimedTrace.h2
-rw-r--r--modules/audio_coding/main/test/TwoWayCommunication.cc2
-rw-r--r--modules/audio_coding/main/test/dual_stream_unittest.cc11
-rw-r--r--modules/audio_coding/main/test/initial_delay_unittest.cc2
-rw-r--r--modules/audio_coding/main/test/insert_packet_with_timing.cc2
-rw-r--r--modules/audio_coding/main/test/target_delay_unittest.cc2
-rw-r--r--modules/audio_coding/neteq/audio_classifier_unittest.cc2
-rw-r--r--modules/audio_coding/neteq/audio_decoder_unittest.cc29
-rw-r--r--modules/audio_coding/neteq/audio_decoder_unittests.isolate16
-rw-r--r--modules/audio_coding/neteq/audio_multi_vector.cc10
-rw-r--r--modules/audio_coding/neteq/audio_multi_vector.h7
-rw-r--r--modules/audio_coding/neteq/audio_multi_vector_unittest.cc33
-rw-r--r--modules/audio_coding/neteq/audio_vector.cc2
-rw-r--r--modules/audio_coding/neteq/audio_vector.h2
-rw-r--r--modules/audio_coding/neteq/audio_vector_unittest.cc8
-rw-r--r--modules/audio_coding/neteq/background_noise_unittest.cc2
-rw-r--r--modules/audio_coding/neteq/buffer_level_filter_unittest.cc2
-rw-r--r--modules/audio_coding/neteq/comfort_noise_unittest.cc2
-rw-r--r--modules/audio_coding/neteq/decision_logic_normal.cc6
-rw-r--r--modules/audio_coding/neteq/decision_logic_unittest.cc2
-rw-r--r--modules/audio_coding/neteq/decoder_database_unittest.cc4
-rw-r--r--modules/audio_coding/neteq/delay_manager_unittest.cc4
-rw-r--r--modules/audio_coding/neteq/delay_peak_detector_unittest.cc2
-rw-r--r--modules/audio_coding/neteq/dsp_helper_unittest.cc2
-rw-r--r--modules/audio_coding/neteq/dtmf_buffer_unittest.cc2
-rw-r--r--modules/audio_coding/neteq/dtmf_tone_generator.cc8
-rw-r--r--modules/audio_coding/neteq/dtmf_tone_generator.h1
-rw-r--r--modules/audio_coding/neteq/dtmf_tone_generator_unittest.cc209
-rw-r--r--modules/audio_coding/neteq/expand.cc2
-rw-r--r--modules/audio_coding/neteq/expand_unittest.cc2
-rw-r--r--modules/audio_coding/neteq/merge_unittest.cc2
-rw-r--r--modules/audio_coding/neteq/mock/mock_audio_decoder.h2
-rw-r--r--modules/audio_coding/neteq/mock/mock_audio_vector.h2
-rw-r--r--modules/audio_coding/neteq/mock/mock_buffer_level_filter.h2
-rw-r--r--modules/audio_coding/neteq/mock/mock_decoder_database.h2
-rw-r--r--modules/audio_coding/neteq/mock/mock_delay_manager.h2
-rw-r--r--modules/audio_coding/neteq/mock/mock_delay_peak_detector.h2
-rw-r--r--modules/audio_coding/neteq/mock/mock_dtmf_buffer.h2
-rw-r--r--modules/audio_coding/neteq/mock/mock_dtmf_tone_generator.h2
-rw-r--r--modules/audio_coding/neteq/mock/mock_expand.h58
-rw-r--r--modules/audio_coding/neteq/mock/mock_external_decoder_pcm16b.h2
-rw-r--r--modules/audio_coding/neteq/mock/mock_packet_buffer.h2
-rw-r--r--modules/audio_coding/neteq/mock/mock_payload_splitter.h2
-rw-r--r--modules/audio_coding/neteq/neteq.gypi8
-rw-r--r--modules/audio_coding/neteq/neteq_external_decoder_unittest.cc377
-rw-r--r--modules/audio_coding/neteq/neteq_impl.cc11
-rw-r--r--modules/audio_coding/neteq/neteq_impl.h61
-rw-r--r--modules/audio_coding/neteq/neteq_impl_unittest.cc4
-rw-r--r--modules/audio_coding/neteq/neteq_stereo_unittest.cc2
-rw-r--r--modules/audio_coding/neteq/neteq_unittest.cc2
-rw-r--r--modules/audio_coding/neteq/normal.cc11
-rw-r--r--modules/audio_coding/neteq/normal_unittest.cc82
-rw-r--r--modules/audio_coding/neteq/packet_buffer_unittest.cc4
-rw-r--r--modules/audio_coding/neteq/payload_splitter_unittest.cc2
-rw-r--r--modules/audio_coding/neteq/post_decode_vad_unittest.cc2
-rw-r--r--modules/audio_coding/neteq/random_vector_unittest.cc2
-rw-r--r--modules/audio_coding/neteq/sync_buffer_unittest.cc2
-rw-r--r--modules/audio_coding/neteq/test/RTPcat.cc2
-rw-r--r--modules/audio_coding/neteq/test/RTPencode.cc12
-rw-r--r--modules/audio_coding/neteq/test/RTPjitter.cc280
-rw-r--r--modules/audio_coding/neteq/test/RTPtimeshift.cc2
-rw-r--r--modules/audio_coding/neteq/test/neteq_isac_quality_test.cc3
-rw-r--r--modules/audio_coding/neteq/time_stretch_unittest.cc2
-rw-r--r--modules/audio_coding/neteq/timestamp_scaler_unittest.cc4
-rw-r--r--modules/audio_coding/neteq/tools/input_audio_file.cc7
-rw-r--r--modules/audio_coding/neteq/tools/input_audio_file.h3
-rw-r--r--modules/audio_coding/neteq/tools/input_audio_file_unittest.cc58
-rw-r--r--modules/audio_coding/neteq/tools/packet_unittest.cc2
-rw-r--r--modules/audio_coding/neteq/tools/rtp_generator.cc14
-rw-r--r--modules/audio_coding/neteq/tools/rtp_generator.h32
-rw-r--r--modules/audio_coding_module.target.darwin-arm.mk68
-rw-r--r--modules/audio_coding_module.target.darwin-arm64.mk52
-rw-r--r--modules/audio_coding_module.target.darwin-mips.mk60
-rw-r--r--modules/audio_coding_module.target.darwin-x86.mk56
-rw-r--r--modules/audio_coding_module.target.darwin-x86_64.mk56
-rw-r--r--modules/audio_coding_module.target.linux-arm.mk68
-rw-r--r--modules/audio_coding_module.target.linux-arm64.mk52
-rw-r--r--modules/audio_coding_module.target.linux-mips.mk60
-rw-r--r--modules/audio_coding_module.target.linux-x86.mk56
-rw-r--r--modules/audio_coding_module.target.linux-x86_64.mk56
-rw-r--r--modules/audio_conference_mixer.target.darwin-arm.mk68
-rw-r--r--modules/audio_conference_mixer.target.darwin-arm64.mk52
-rw-r--r--modules/audio_conference_mixer.target.darwin-mips.mk60
-rw-r--r--modules/audio_conference_mixer.target.darwin-x86.mk56
-rw-r--r--modules/audio_conference_mixer.target.darwin-x86_64.mk56
-rw-r--r--modules/audio_conference_mixer.target.linux-arm.mk68
-rw-r--r--modules/audio_conference_mixer.target.linux-arm64.mk52
-rw-r--r--modules/audio_conference_mixer.target.linux-mips.mk60
-rw-r--r--modules/audio_conference_mixer.target.linux-x86.mk56
-rw-r--r--modules/audio_conference_mixer.target.linux-x86_64.mk56
-rw-r--r--modules/audio_conference_mixer/BUILD.gn8
-rw-r--r--modules/audio_conference_mixer/OWNERS1
-rw-r--r--modules/audio_conference_mixer/interface/audio_conference_mixer.h6
-rw-r--r--modules/audio_conference_mixer/source/Android.mk44
-rw-r--r--modules/audio_conference_mixer/source/audio_conference_mixer_impl.h24
-rw-r--r--modules/audio_device.target.darwin-arm.mk68
-rw-r--r--modules/audio_device.target.darwin-arm64.mk52
-rw-r--r--modules/audio_device.target.darwin-mips.mk60
-rw-r--r--modules/audio_device.target.darwin-x86.mk56
-rw-r--r--modules/audio_device.target.darwin-x86_64.mk56
-rw-r--r--modules/audio_device.target.linux-arm.mk68
-rw-r--r--modules/audio_device.target.linux-arm64.mk52
-rw-r--r--modules/audio_device.target.linux-mips.mk60
-rw-r--r--modules/audio_device.target.linux-x86.mk56
-rw-r--r--modules/audio_device.target.linux-x86_64.mk56
-rw-r--r--modules/audio_device/Android.mk58
-rw-r--r--modules/audio_device/BUILD.gn171
-rw-r--r--modules/audio_device/android/OWNERS1
-rw-r--r--modules/audio_device/linux/latebindingsymboltable_linux.cc9
-rw-r--r--modules/audio_processing.target.darwin-arm.mk69
-rw-r--r--modules/audio_processing.target.darwin-arm64.mk53
-rw-r--r--modules/audio_processing.target.darwin-mips.mk61
-rw-r--r--modules/audio_processing.target.darwin-x86.mk57
-rw-r--r--modules/audio_processing.target.darwin-x86_64.mk57
-rw-r--r--modules/audio_processing.target.linux-arm.mk69
-rw-r--r--modules/audio_processing.target.linux-arm64.mk53
-rw-r--r--modules/audio_processing.target.linux-mips.mk61
-rw-r--r--modules/audio_processing.target.linux-x86.mk57
-rw-r--r--modules/audio_processing.target.linux-x86_64.mk57
-rw-r--r--modules/audio_processing/Android.mk153
-rw-r--r--modules/audio_processing/BUILD.gn219
-rw-r--r--modules/audio_processing/aec/Android.mk59
-rw-r--r--modules/audio_processing/aec/aec_core.c83
-rw-r--r--modules/audio_processing/aec/aec_core_internal.h21
-rw-r--r--modules/audio_processing/aec/aec_core_sse2.c304
-rw-r--r--modules/audio_processing/aec/aec_rdft_mips.c920
-rw-r--r--modules/audio_processing/aec/echo_cancellation.c31
-rw-r--r--modules/audio_processing/aec/echo_cancellation_internal.h1
-rw-r--r--modules/audio_processing/aecm/Android.mk95
-rw-r--r--modules/audio_processing/aecm/aecm_core.c29
-rw-r--r--modules/audio_processing/aecm/aecm_core_c.c9
-rw-r--r--modules/audio_processing/aecm/aecm_core_mips.c8
-rw-r--r--modules/audio_processing/aecm/aecm_core_neon.c7
-rw-r--r--modules/audio_processing/agc/Android.mk41
-rw-r--r--modules/audio_processing/agc/analog_agc.c153
-rw-r--r--modules/audio_processing/agc/analog_agc.h11
-rw-r--r--modules/audio_processing/agc/digital_agc.c46
-rw-r--r--modules/audio_processing/agc/digital_agc.h8
-rw-r--r--modules/audio_processing/audio_buffer.cc31
-rw-r--r--modules/audio_processing/audio_processing.gypi11
-rw-r--r--modules/audio_processing/audio_processing_impl.cc17
-rw-r--r--modules/audio_processing/audio_processing_tests.gypi1
-rw-r--r--modules/audio_processing/common.h53
-rw-r--r--modules/audio_processing/gen_aecm_core_neon_offsets_h.target.darwin-arm.mk24
-rw-r--r--modules/audio_processing/gen_aecm_core_neon_offsets_h.target.linux-arm.mk24
-rw-r--r--modules/audio_processing/gen_nsx_core_neon_offsets_h.target.darwin-arm.mk24
-rw-r--r--modules/audio_processing/gen_nsx_core_neon_offsets_h.target.linux-arm.mk24
-rw-r--r--modules/audio_processing/lib_core_neon_offsets.target.darwin-arm.mk68
-rw-r--r--modules/audio_processing/lib_core_neon_offsets.target.linux-arm.mk68
-rw-r--r--modules/audio_processing/noise_suppression_impl.cc27
-rw-r--r--modules/audio_processing/noise_suppression_impl.h1
-rw-r--r--modules/audio_processing/ns/Android.mk95
-rw-r--r--modules/audio_processing/ns/defines.h5
-rw-r--r--modules/audio_processing/ns/include/noise_suppression.h15
-rw-r--r--modules/audio_processing/ns/noise_suppression.c3
-rw-r--r--modules/audio_processing/ns/ns_core.c847
-rw-r--r--modules/audio_processing/ns/ns_core.h156
-rw-r--r--modules/audio_processing/ns/nsx_core.c80
-rw-r--r--modules/audio_processing/ns/nsx_core_c.c39
-rw-r--r--modules/audio_processing/ns/nsx_core_mips.c19
-rw-r--r--modules/audio_processing/ns/nsx_core_neon.c4
-rw-r--r--modules/audio_processing/test/android/apmtest/jni/Android.mk26
-rw-r--r--modules/audio_processing/test/audio_processing_unittest.cc111
-rw-r--r--modules/audio_processing/test/process_test.cc86
-rw-r--r--modules/audio_processing/test/test_utils.h62
-rw-r--r--modules/audio_processing/test/unpack.cc164
-rw-r--r--modules/audio_processing/utility/Android.mk44
-rw-r--r--modules/audio_processing_neon.target.darwin-arm.mk69
-rw-r--r--modules/audio_processing_neon.target.linux-arm.mk69
-rw-r--r--modules/audio_processing_sse2.target.darwin-x86.mk56
-rw-r--r--modules/audio_processing_sse2.target.darwin-x86_64.mk56
-rw-r--r--modules/audio_processing_sse2.target.linux-x86.mk56
-rw-r--r--modules/audio_processing_sse2.target.linux-x86_64.mk56
-rw-r--r--modules/audioproc_debug_proto.target.darwin-arm.mk68
-rw-r--r--modules/audioproc_debug_proto.target.darwin-arm64.mk52
-rw-r--r--modules/audioproc_debug_proto.target.darwin-mips.mk60
-rw-r--r--modules/audioproc_debug_proto.target.darwin-x86.mk56
-rw-r--r--modules/audioproc_debug_proto.target.darwin-x86_64.mk56
-rw-r--r--modules/audioproc_debug_proto.target.linux-arm.mk68
-rw-r--r--modules/audioproc_debug_proto.target.linux-arm64.mk52
-rw-r--r--modules/audioproc_debug_proto.target.linux-mips.mk60
-rw-r--r--modules/audioproc_debug_proto.target.linux-x86.mk56
-rw-r--r--modules/audioproc_debug_proto.target.linux-x86_64.mk56
-rw-r--r--modules/bitrate_controller.target.darwin-arm.mk68
-rw-r--r--modules/bitrate_controller.target.darwin-arm64.mk52
-rw-r--r--modules/bitrate_controller.target.darwin-mips.mk60
-rw-r--r--modules/bitrate_controller.target.darwin-x86.mk56
-rw-r--r--modules/bitrate_controller.target.darwin-x86_64.mk56
-rw-r--r--modules/bitrate_controller.target.linux-arm.mk68
-rw-r--r--modules/bitrate_controller.target.linux-arm64.mk52
-rw-r--r--modules/bitrate_controller.target.linux-mips.mk60
-rw-r--r--modules/bitrate_controller.target.linux-x86.mk56
-rw-r--r--modules/bitrate_controller.target.linux-x86_64.mk56
-rw-r--r--modules/bitrate_controller/BUILD.gn6
-rw-r--r--modules/bitrate_controller/OWNERS1
-rw-r--r--modules/desktop_capture/BUILD.gn16
-rw-r--r--modules/desktop_capture/desktop_and_cursor_composer_unittest.cc2
-rw-r--r--modules/desktop_capture/desktop_capture.gypi1
-rw-r--r--modules/desktop_capture/desktop_region_unittest.cc2
-rw-r--r--modules/desktop_capture/mouse_cursor_monitor_mac.mm1
-rw-r--r--modules/desktop_capture/mouse_cursor_monitor_unittest.cc2
-rw-r--r--modules/desktop_capture/screen_capturer_mac.mm1
-rw-r--r--modules/desktop_capture/window_capturer_unittest.cc2
-rw-r--r--modules/desktop_capture/window_capturer_win.cc11
-rw-r--r--modules/iLBC.target.darwin-arm.mk68
-rw-r--r--modules/iLBC.target.darwin-arm64.mk52
-rw-r--r--modules/iLBC.target.darwin-mips.mk60
-rw-r--r--modules/iLBC.target.darwin-x86.mk56
-rw-r--r--modules/iLBC.target.darwin-x86_64.mk56
-rw-r--r--modules/iLBC.target.linux-arm.mk68
-rw-r--r--modules/iLBC.target.linux-arm64.mk52
-rw-r--r--modules/iLBC.target.linux-mips.mk60
-rw-r--r--modules/iLBC.target.linux-x86.mk56
-rw-r--r--modules/iLBC.target.linux-x86_64.mk56
-rw-r--r--modules/iSAC.target.darwin-arm.mk68
-rw-r--r--modules/iSAC.target.darwin-arm64.mk52
-rw-r--r--modules/iSAC.target.darwin-mips.mk60
-rw-r--r--modules/iSAC.target.darwin-x86.mk56
-rw-r--r--modules/iSAC.target.darwin-x86_64.mk56
-rw-r--r--modules/iSAC.target.linux-arm.mk68
-rw-r--r--modules/iSAC.target.linux-arm64.mk52
-rw-r--r--modules/iSAC.target.linux-mips.mk60
-rw-r--r--modules/iSAC.target.linux-x86.mk56
-rw-r--r--modules/iSAC.target.linux-x86_64.mk56
-rw-r--r--modules/iSACFix.target.darwin-arm.mk68
-rw-r--r--modules/iSACFix.target.darwin-arm64.mk52
-rw-r--r--modules/iSACFix.target.darwin-mips.mk60
-rw-r--r--modules/iSACFix.target.darwin-x86.mk56
-rw-r--r--modules/iSACFix.target.darwin-x86_64.mk56
-rw-r--r--modules/iSACFix.target.linux-arm.mk68
-rw-r--r--modules/iSACFix.target.linux-arm64.mk52
-rw-r--r--modules/iSACFix.target.linux-mips.mk60
-rw-r--r--modules/iSACFix.target.linux-x86.mk56
-rw-r--r--modules/iSACFix.target.linux-x86_64.mk56
-rw-r--r--modules/isac_neon.target.darwin-arm.mk68
-rw-r--r--modules/isac_neon.target.linux-arm.mk68
-rw-r--r--modules/media_file.target.darwin-arm.mk68
-rw-r--r--modules/media_file.target.darwin-arm64.mk52
-rw-r--r--modules/media_file.target.darwin-mips.mk60
-rw-r--r--modules/media_file.target.darwin-x86.mk56
-rw-r--r--modules/media_file.target.darwin-x86_64.mk56
-rw-r--r--modules/media_file.target.linux-arm.mk68
-rw-r--r--modules/media_file.target.linux-arm64.mk52
-rw-r--r--modules/media_file.target.linux-mips.mk60
-rw-r--r--modules/media_file.target.linux-x86.mk56
-rw-r--r--modules/media_file.target.linux-x86_64.mk56
-rw-r--r--modules/media_file/BUILD.gn8
-rw-r--r--modules/media_file/OWNERS1
-rw-r--r--modules/media_file/interface/media_file.h2
-rw-r--r--modules/media_file/source/Android.mk46
-rw-r--r--modules/media_file/source/media_file_impl.h73
-rw-r--r--modules/modules.gyp20
-rw-r--r--modules/neteq.target.darwin-arm.mk68
-rw-r--r--modules/neteq.target.darwin-arm64.mk52
-rw-r--r--modules/neteq.target.darwin-mips.mk60
-rw-r--r--modules/neteq.target.darwin-x86.mk56
-rw-r--r--modules/neteq.target.darwin-x86_64.mk56
-rw-r--r--modules/neteq.target.linux-arm.mk68
-rw-r--r--modules/neteq.target.linux-arm64.mk52
-rw-r--r--modules/neteq.target.linux-mips.mk60
-rw-r--r--modules/neteq.target.linux-x86.mk56
-rw-r--r--modules/neteq.target.linux-x86_64.mk56
-rw-r--r--modules/paced_sender.target.darwin-arm.mk68
-rw-r--r--modules/paced_sender.target.darwin-arm64.mk52
-rw-r--r--modules/paced_sender.target.darwin-mips.mk60
-rw-r--r--modules/paced_sender.target.darwin-x86.mk56
-rw-r--r--modules/paced_sender.target.darwin-x86_64.mk56
-rw-r--r--modules/paced_sender.target.linux-arm.mk68
-rw-r--r--modules/paced_sender.target.linux-arm64.mk52
-rw-r--r--modules/paced_sender.target.linux-mips.mk60
-rw-r--r--modules/paced_sender.target.linux-x86.mk56
-rw-r--r--modules/paced_sender.target.linux-x86_64.mk56
-rw-r--r--modules/pacing/BUILD.gn6
-rw-r--r--modules/pacing/OWNERS1
-rw-r--r--modules/pacing/include/paced_sender.h2
-rw-r--r--modules/remote_bitrate_estimator.target.darwin-arm.mk68
-rw-r--r--modules/remote_bitrate_estimator.target.darwin-arm64.mk52
-rw-r--r--modules/remote_bitrate_estimator.target.darwin-mips.mk60
-rw-r--r--modules/remote_bitrate_estimator.target.darwin-x86.mk56
-rw-r--r--modules/remote_bitrate_estimator.target.darwin-x86_64.mk56
-rw-r--r--modules/remote_bitrate_estimator.target.linux-arm.mk68
-rw-r--r--modules/remote_bitrate_estimator.target.linux-arm64.mk52
-rw-r--r--modules/remote_bitrate_estimator.target.linux-mips.mk60
-rw-r--r--modules/remote_bitrate_estimator.target.linux-x86.mk56
-rw-r--r--modules/remote_bitrate_estimator.target.linux-x86_64.mk56
-rw-r--r--modules/remote_bitrate_estimator/BUILD.gn6
-rw-r--r--modules/remote_bitrate_estimator/OWNERS1
-rw-r--r--modules/remote_bitrate_estimator/bwe_simulations.cc2
-rw-r--r--modules/remote_bitrate_estimator/rbe_components.target.darwin-arm.mk68
-rw-r--r--modules/remote_bitrate_estimator/rbe_components.target.darwin-arm64.mk52
-rw-r--r--modules/remote_bitrate_estimator/rbe_components.target.darwin-mips.mk60
-rw-r--r--modules/remote_bitrate_estimator/rbe_components.target.darwin-x86.mk56
-rw-r--r--modules/remote_bitrate_estimator/rbe_components.target.darwin-x86_64.mk56
-rw-r--r--modules/remote_bitrate_estimator/rbe_components.target.linux-arm.mk68
-rw-r--r--modules/remote_bitrate_estimator/rbe_components.target.linux-arm64.mk52
-rw-r--r--modules/remote_bitrate_estimator/rbe_components.target.linux-mips.mk60
-rw-r--r--modules/remote_bitrate_estimator/rbe_components.target.linux-x86.mk56
-rw-r--r--modules/remote_bitrate_estimator/rbe_components.target.linux-x86_64.mk56
-rw-r--r--modules/remote_bitrate_estimator/test/bwe_test.h2
-rw-r--r--modules/remote_bitrate_estimator/test/bwe_test_framework_unittest.cc2
-rw-r--r--modules/rtp_rtcp.target.darwin-arm.mk69
-rw-r--r--modules/rtp_rtcp.target.darwin-arm64.mk53
-rw-r--r--modules/rtp_rtcp.target.darwin-mips.mk61
-rw-r--r--modules/rtp_rtcp.target.darwin-x86.mk57
-rw-r--r--modules/rtp_rtcp.target.darwin-x86_64.mk57
-rw-r--r--modules/rtp_rtcp.target.linux-arm.mk69
-rw-r--r--modules/rtp_rtcp.target.linux-arm64.mk53
-rw-r--r--modules/rtp_rtcp.target.linux-mips.mk61
-rw-r--r--modules/rtp_rtcp.target.linux-x86.mk57
-rw-r--r--modules/rtp_rtcp.target.linux-x86_64.mk57
-rw-r--r--modules/rtp_rtcp/BUILD.gn7
-rw-r--r--modules/rtp_rtcp/OWNERS1
-rw-r--r--modules/rtp_rtcp/interface/rtp_rtcp_defines.h7
-rw-r--r--modules/rtp_rtcp/source/Android.mk67
-rw-r--r--modules/rtp_rtcp/source/nack_rtx_unittest.cc5
-rw-r--r--modules/rtp_rtcp/source/receive_statistics_impl.cc37
-rw-r--r--modules/rtp_rtcp/source/receive_statistics_impl.h2
-rw-r--r--modules/rtp_rtcp/source/receive_statistics_unittest.cc82
-rw-r--r--modules/rtp_rtcp/source/rtcp_receiver_unittest.cc311
-rw-r--r--modules/rtp_rtcp/source/rtcp_sender.h2
-rw-r--r--modules/rtp_rtcp/source/rtp_format.cc21
-rw-r--r--modules/rtp_rtcp/source/rtp_format.h13
-rw-r--r--modules/rtp_rtcp/source/rtp_format_h264.cc22
-rw-r--r--modules/rtp_rtcp/source/rtp_format_h264.h9
-rw-r--r--modules/rtp_rtcp/source/rtp_format_h264_unittest.cc14
-rw-r--r--modules/rtp_rtcp/source/rtp_format_video_generic.cc112
-rw-r--r--modules/rtp_rtcp/source/rtp_format_video_generic.h65
-rw-r--r--modules/rtp_rtcp/source/rtp_format_vp8.cc388
-rw-r--r--modules/rtp_rtcp/source/rtp_format_vp8.h63
-rw-r--r--modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc335
-rw-r--r--modules/rtp_rtcp/source/rtp_packet_history.h2
-rw-r--r--modules/rtp_rtcp/source/rtp_receiver_impl.cc11
-rw-r--r--modules/rtp_rtcp/source/rtp_receiver_impl.h37
-rw-r--r--modules/rtp_rtcp/source/rtp_receiver_video.cc152
-rw-r--r--modules/rtp_rtcp/source/rtp_receiver_video.h45
-rw-r--r--modules/rtp_rtcp/source/rtp_rtcp.gypi1
-rw-r--r--modules/rtp_rtcp/source/rtp_rtcp_impl.cc4
-rw-r--r--modules/rtp_rtcp/source/rtp_rtcp_impl.h26
-rw-r--r--modules/rtp_rtcp/source/rtp_sender.cc7
-rw-r--r--modules/rtp_rtcp/source/rtp_sender.h4
-rw-r--r--modules/rtp_rtcp/source/rtp_sender_audio.cc14
-rw-r--r--modules/rtp_rtcp/source/rtp_sender_unittest.cc55
-rw-r--r--modules/rtp_rtcp/source/rtp_sender_video.cc465
-rw-r--r--modules/rtp_rtcp/source/rtp_sender_video.h192
-rw-r--r--modules/rtp_rtcp/source/rtp_utility.cc229
-rw-r--r--modules/rtp_rtcp/source/rtp_utility.h92
-rw-r--r--modules/rtp_rtcp/source/rtp_utility_unittest.cc288
-rw-r--r--modules/rtp_rtcp/test/BWEStandAlone/BWEStandAlone.cc12
-rw-r--r--modules/rtp_rtcp/test/BWEStandAlone/TestSenderReceiver.h45
-rw-r--r--modules/utility/BUILD.gn8
-rw-r--r--modules/utility/OWNERS1
-rw-r--r--modules/utility/source/Android.mk56
-rw-r--r--modules/utility/source/coder.h17
-rw-r--r--modules/utility/source/rtp_dump_impl.h9
-rw-r--r--modules/utility/source/video_coder.h6
-rw-r--r--modules/video_capture/Android.mk50
-rw-r--r--modules/video_capture/BUILD.gn157
-rw-r--r--modules/video_capture/OWNERS2
-rw-r--r--modules/video_capture/android/OWNERS1
-rw-r--r--modules/video_capture/android/device_info_android.cc16
-rw-r--r--modules/video_capture/android/java/src/org/webrtc/videoengine/VideoCaptureAndroid.java6
-rw-r--r--modules/video_capture/ensure_initialized.cc30
-rw-r--r--modules/video_capture/include/video_capture.h8
-rw-r--r--modules/video_capture/include/video_capture_factory.h4
-rw-r--r--modules/video_capture/ios/rtc_video_capture_ios_objc.mm27
-rw-r--r--modules/video_capture/video_capture.gypi254
-rw-r--r--modules/video_capture/video_capture_internal.h27
-rw-r--r--modules/video_capture_module.target.darwin-arm.mk72
-rw-r--r--modules/video_capture_module.target.darwin-arm64.mk56
-rw-r--r--modules/video_capture_module.target.darwin-mips.mk64
-rw-r--r--modules/video_capture_module.target.darwin-x86.mk60
-rw-r--r--modules/video_capture_module.target.darwin-x86_64.mk60
-rw-r--r--modules/video_capture_module.target.linux-arm.mk72
-rw-r--r--modules/video_capture_module.target.linux-arm64.mk56
-rw-r--r--modules/video_capture_module.target.linux-mips.mk64
-rw-r--r--modules/video_capture_module.target.linux-x86.mk60
-rw-r--r--modules/video_capture_module.target.linux-x86_64.mk60
-rw-r--r--modules/video_capture_module_impl.target.darwin-arm.mk300
-rw-r--r--modules/video_capture_module_impl.target.darwin-arm64.mk270
-rw-r--r--modules/video_capture_module_impl.target.darwin-mips.mk286
-rw-r--r--modules/video_capture_module_impl.target.darwin-x86.mk282
-rw-r--r--modules/video_capture_module_impl.target.darwin-x86_64.mk280
-rw-r--r--modules/video_capture_module_impl.target.linux-arm.mk300
-rw-r--r--modules/video_capture_module_impl.target.linux-arm64.mk270
-rw-r--r--modules/video_capture_module_impl.target.linux-mips.mk286
-rw-r--r--modules/video_capture_module_impl.target.linux-x86.mk282
-rw-r--r--modules/video_capture_module_impl.target.linux-x86_64.mk280
-rw-r--r--modules/video_coding/BUILD.gn27
-rw-r--r--modules/video_coding/OWNERS1
-rw-r--r--modules/video_coding/codecs/OWNERS1
-rw-r--r--modules/video_coding/codecs/i420/main/source/Android.mk41
-rw-r--r--modules/video_coding/codecs/interface/video_codec_interface.h103
-rw-r--r--modules/video_coding/codecs/test/mock/mock_packet_manipulator.h2
-rw-r--r--modules/video_coding/codecs/test/videoprocessor_integrationtest.cc28
-rw-r--r--modules/video_coding/codecs/vp8/Android.mk47
-rw-r--r--modules/video_coding/codecs/vp8/vp8_impl.cc55
-rw-r--r--modules/video_coding/codecs/vp8/vp8_impl.h2
-rw-r--r--modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-arm.mk68
-rw-r--r--modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-arm64.mk52
-rw-r--r--modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-mips.mk60
-rw-r--r--modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-x86.mk56
-rw-r--r--modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-x86_64.mk56
-rw-r--r--modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-arm.mk68
-rw-r--r--modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-arm64.mk52
-rw-r--r--modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-mips.mk60
-rw-r--r--modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-x86.mk56
-rw-r--r--modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-x86_64.mk56
-rw-r--r--modules/video_coding/main/source/Android.mk68
-rw-r--r--modules/video_coding/main/source/codec_database.cc46
-rw-r--r--modules/video_coding/main/source/jitter_buffer.cc5
-rw-r--r--modules/video_coding/main/source/jitter_estimator.cc161
-rw-r--r--modules/video_coding/main/source/jitter_estimator.h19
-rw-r--r--modules/video_coding/main/source/jitter_estimator_tests.cc160
-rw-r--r--modules/video_coding/main/source/timing.h2
-rw-r--r--modules/video_coding/main/source/video_coding_impl.cc30
-rw-r--r--modules/video_coding/main/source/video_coding_impl.h2
-rw-r--r--modules/video_coding/main/source/video_coding_test.gypi4
-rw-r--r--modules/video_coding/main/source/video_sender_unittest.cc15
-rw-r--r--modules/video_coding/main/test/normal_test.h22
-rw-r--r--modules/video_coding/main/test/receiver_tests.h2
-rw-r--r--modules/video_coding/main/test/vcm_payload_sink_factory.cc6
-rw-r--r--modules/video_coding/utility/Android.mk39
-rw-r--r--modules/video_coding/utility/quality_scaler.cc137
-rw-r--r--modules/video_coding/utility/quality_scaler.h65
-rw-r--r--modules/video_coding/utility/quality_scaler_unittest.cc198
-rw-r--r--modules/video_coding/utility/video_coding_utility.gyp4
-rw-r--r--modules/video_coding/utility/video_coding_utility.target.darwin-arm.mk71
-rw-r--r--modules/video_coding/utility/video_coding_utility.target.darwin-arm64.mk55
-rw-r--r--modules/video_coding/utility/video_coding_utility.target.darwin-mips.mk63
-rw-r--r--modules/video_coding/utility/video_coding_utility.target.darwin-x86.mk59
-rw-r--r--modules/video_coding/utility/video_coding_utility.target.darwin-x86_64.mk59
-rw-r--r--modules/video_coding/utility/video_coding_utility.target.linux-arm.mk71
-rw-r--r--modules/video_coding/utility/video_coding_utility.target.linux-arm64.mk55
-rw-r--r--modules/video_coding/utility/video_coding_utility.target.linux-mips.mk63
-rw-r--r--modules/video_coding/utility/video_coding_utility.target.linux-x86.mk59
-rw-r--r--modules/video_coding/utility/video_coding_utility.target.linux-x86_64.mk59
-rw-r--r--modules/video_processing.target.darwin-arm.mk68
-rw-r--r--modules/video_processing.target.darwin-arm64.mk52
-rw-r--r--modules/video_processing.target.darwin-mips.mk60
-rw-r--r--modules/video_processing.target.darwin-x86.mk56
-rw-r--r--modules/video_processing.target.darwin-x86_64.mk56
-rw-r--r--modules/video_processing.target.linux-arm.mk68
-rw-r--r--modules/video_processing.target.linux-arm64.mk52
-rw-r--r--modules/video_processing.target.linux-mips.mk60
-rw-r--r--modules/video_processing.target.linux-x86.mk56
-rw-r--r--modules/video_processing.target.linux-x86_64.mk56
-rw-r--r--modules/video_processing/BUILD.gn16
-rw-r--r--modules/video_processing/OWNERS1
-rw-r--r--modules/video_processing/main/interface/video_processing.h4
-rw-r--r--modules/video_processing/main/source/Android.mk58
-rw-r--r--modules/video_processing/main/source/deflickering.cc14
-rw-r--r--modules/video_processing/main/source/video_processing_impl.h28
-rw-r--r--modules/video_processing_sse2.target.darwin-x86.mk56
-rw-r--r--modules/video_processing_sse2.target.darwin-x86_64.mk56
-rw-r--r--modules/video_processing_sse2.target.linux-x86.mk56
-rw-r--r--modules/video_processing_sse2.target.linux-x86_64.mk56
-rw-r--r--modules/video_render/Android.mk53
-rw-r--r--modules/video_render/BUILD.gn154
-rw-r--r--modules/video_render/OWNERS2
-rw-r--r--modules/video_render/android/OWNERS1
-rw-r--r--modules/video_render/android/video_render_android_impl.cc7
-rw-r--r--modules/video_render/include/video_render.h10
-rw-r--r--modules/video_render/mac/cocoa_full_screen_window.mm4
-rw-r--r--modules/video_render/mac/cocoa_render_view.mm5
-rw-r--r--modules/video_render/mac/video_render_mac_cocoa_impl.mm11
-rw-r--r--modules/video_render/mac/video_render_nsopengl.mm10
-rw-r--r--modules/video_render/test/testAPI/testAPI.cc9
-rw-r--r--modules/video_render/video_render.gypi156
-rw-r--r--modules/video_render/video_render_impl.cc247
-rw-r--r--modules/video_render/video_render_internal.h27
-rw-r--r--modules/video_render/video_render_internal_impl.cc917
-rw-r--r--modules/video_render_module.target.darwin-arm.mk71
-rw-r--r--modules/video_render_module.target.darwin-arm64.mk55
-rw-r--r--modules/video_render_module.target.darwin-mips.mk63
-rw-r--r--modules/video_render_module.target.darwin-x86.mk59
-rw-r--r--modules/video_render_module.target.darwin-x86_64.mk59
-rw-r--r--modules/video_render_module.target.linux-arm.mk71
-rw-r--r--modules/video_render_module.target.linux-arm64.mk55
-rw-r--r--modules/video_render_module.target.linux-mips.mk63
-rw-r--r--modules/video_render_module.target.linux-x86.mk59
-rw-r--r--modules/video_render_module.target.linux-x86_64.mk59
-rw-r--r--modules/video_render_module_impl.target.darwin-arm.mk299
-rw-r--r--modules/video_render_module_impl.target.darwin-arm64.mk269
-rw-r--r--modules/video_render_module_impl.target.darwin-mips.mk285
-rw-r--r--modules/video_render_module_impl.target.darwin-x86.mk281
-rw-r--r--modules/video_render_module_impl.target.darwin-x86_64.mk279
-rw-r--r--modules/video_render_module_impl.target.linux-arm.mk299
-rw-r--r--modules/video_render_module_impl.target.linux-arm64.mk269
-rw-r--r--modules/video_render_module_impl.target.linux-mips.mk285
-rw-r--r--modules/video_render_module_impl.target.linux-x86.mk281
-rw-r--r--modules/video_render_module_impl.target.linux-x86_64.mk279
-rw-r--r--modules/webrtc_i420.target.darwin-arm.mk68
-rw-r--r--modules/webrtc_i420.target.darwin-arm64.mk52
-rw-r--r--modules/webrtc_i420.target.darwin-mips.mk60
-rw-r--r--modules/webrtc_i420.target.darwin-x86.mk56
-rw-r--r--modules/webrtc_i420.target.darwin-x86_64.mk56
-rw-r--r--modules/webrtc_i420.target.linux-arm.mk68
-rw-r--r--modules/webrtc_i420.target.linux-arm64.mk52
-rw-r--r--modules/webrtc_i420.target.linux-mips.mk60
-rw-r--r--modules/webrtc_i420.target.linux-x86.mk56
-rw-r--r--modules/webrtc_i420.target.linux-x86_64.mk56
-rw-r--r--modules/webrtc_opus.target.darwin-arm.mk68
-rw-r--r--modules/webrtc_opus.target.darwin-arm64.mk52
-rw-r--r--modules/webrtc_opus.target.darwin-mips.mk60
-rw-r--r--modules/webrtc_opus.target.darwin-x86.mk56
-rw-r--r--modules/webrtc_opus.target.darwin-x86_64.mk56
-rw-r--r--modules/webrtc_opus.target.linux-arm.mk68
-rw-r--r--modules/webrtc_opus.target.linux-arm64.mk52
-rw-r--r--modules/webrtc_opus.target.linux-mips.mk60
-rw-r--r--modules/webrtc_opus.target.linux-x86.mk56
-rw-r--r--modules/webrtc_opus.target.linux-x86_64.mk56
-rw-r--r--modules/webrtc_utility.target.darwin-arm.mk68
-rw-r--r--modules/webrtc_utility.target.darwin-arm64.mk52
-rw-r--r--modules/webrtc_utility.target.darwin-mips.mk60
-rw-r--r--modules/webrtc_utility.target.darwin-x86.mk56
-rw-r--r--modules/webrtc_utility.target.darwin-x86_64.mk56
-rw-r--r--modules/webrtc_utility.target.linux-arm.mk68
-rw-r--r--modules/webrtc_utility.target.linux-arm64.mk52
-rw-r--r--modules/webrtc_utility.target.linux-mips.mk60
-rw-r--r--modules/webrtc_utility.target.linux-x86.mk56
-rw-r--r--modules/webrtc_utility.target.linux-x86_64.mk56
-rw-r--r--modules/webrtc_video_coding.target.darwin-arm.mk68
-rw-r--r--modules/webrtc_video_coding.target.darwin-arm64.mk52
-rw-r--r--modules/webrtc_video_coding.target.darwin-mips.mk60
-rw-r--r--modules/webrtc_video_coding.target.darwin-x86.mk56
-rw-r--r--modules/webrtc_video_coding.target.darwin-x86_64.mk56
-rw-r--r--modules/webrtc_video_coding.target.linux-arm.mk68
-rw-r--r--modules/webrtc_video_coding.target.linux-arm64.mk52
-rw-r--r--modules/webrtc_video_coding.target.linux-mips.mk60
-rw-r--r--modules/webrtc_video_coding.target.linux-x86.mk56
-rw-r--r--modules/webrtc_video_coding.target.linux-x86_64.mk56
-rw-r--r--overrides/OWNERS13
-rw-r--r--overrides/webrtc/base/constructormagic.h2
-rw-r--r--overrides/webrtc/base/logging.cc5
-rw-r--r--overrides/webrtc/base/logging.h5
-rw-r--r--sound/OWNERS14
-rw-r--r--sound/alsasoundsystem.cc744
-rw-r--r--sound/alsasoundsystem.h103
-rw-r--r--sound/alsasymboltable.cc20
-rw-r--r--sound/alsasymboltable.h49
-rw-r--r--sound/automaticallychosensoundsystem.h88
-rw-r--r--sound/automaticallychosensoundsystem_unittest.cc197
-rw-r--r--sound/linuxsoundsystem.cc25
-rw-r--r--sound/linuxsoundsystem.h41
-rw-r--r--sound/nullsoundsystem.cc157
-rw-r--r--sound/nullsoundsystem.h53
-rw-r--r--sound/nullsoundsystemfactory.cc32
-rw-r--r--sound/nullsoundsystemfactory.h33
-rw-r--r--sound/platformsoundsystem.cc31
-rw-r--r--sound/platformsoundsystem.h23
-rw-r--r--sound/platformsoundsystemfactory.cc40
-rw-r--r--sound/platformsoundsystemfactory.h35
-rw-r--r--sound/pulseaudiosoundsystem.cc1542
-rw-r--r--sound/pulseaudiosoundsystem.h177
-rw-r--r--sound/pulseaudiosymboltable.cc24
-rw-r--r--sound/pulseaudiosymboltable.h87
-rw-r--r--sound/rtc_sound_unittest.isolate25
-rw-r--r--sound/sound.gyp55
-rw-r--r--sound/sound_tests.gyp49
-rw-r--r--sound/sounddevicelocator.h54
-rw-r--r--sound/soundinputstreaminterface.h68
-rw-r--r--sound/soundoutputstreaminterface.h72
-rw-r--r--sound/soundsystemfactory.h27
-rw-r--r--sound/soundsysteminterface.cc29
-rw-r--r--sound/soundsysteminterface.h112
-rw-r--r--sound/soundsystemproxy.cc47
-rw-r--r--sound/soundsystemproxy.h47
-rw-r--r--supplement.gypi21
-rw-r--r--system_wrappers/BUILD.gn18
-rw-r--r--system_wrappers/OWNERS1
-rw-r--r--system_wrappers/interface/critical_section_wrapper.h2
-rw-r--r--system_wrappers/interface/rw_lock_wrapper.h2
-rw-r--r--system_wrappers/source/Android.mk65
-rw-r--r--system_wrappers/source/cpu_features_android.target.darwin-arm.mk63
-rw-r--r--system_wrappers/source/cpu_features_android.target.darwin-arm64.mk47
-rw-r--r--system_wrappers/source/cpu_features_android.target.darwin-mips.mk55
-rw-r--r--system_wrappers/source/cpu_features_android.target.darwin-x86.mk51
-rw-r--r--system_wrappers/source/cpu_features_android.target.darwin-x86_64.mk51
-rw-r--r--system_wrappers/source/cpu_features_android.target.linux-arm.mk63
-rw-r--r--system_wrappers/source/cpu_features_android.target.linux-arm64.mk47
-rw-r--r--system_wrappers/source/cpu_features_android.target.linux-mips.mk55
-rw-r--r--system_wrappers/source/cpu_features_android.target.linux-x86.mk51
-rw-r--r--system_wrappers/source/cpu_features_android.target.linux-x86_64.mk51
-rw-r--r--system_wrappers/source/system_wrappers.gyp3
-rw-r--r--system_wrappers/source/system_wrappers.target.darwin-arm.mk80
-rw-r--r--system_wrappers/source/system_wrappers.target.darwin-arm64.mk64
-rw-r--r--system_wrappers/source/system_wrappers.target.darwin-mips.mk72
-rw-r--r--system_wrappers/source/system_wrappers.target.darwin-x86.mk68
-rw-r--r--system_wrappers/source/system_wrappers.target.darwin-x86_64.mk68
-rw-r--r--system_wrappers/source/system_wrappers.target.linux-arm.mk80
-rw-r--r--system_wrappers/source/system_wrappers.target.linux-arm64.mk64
-rw-r--r--system_wrappers/source/system_wrappers.target.linux-mips.mk72
-rw-r--r--system_wrappers/source/system_wrappers.target.linux-x86.mk68
-rw-r--r--system_wrappers/source/system_wrappers.target.linux-x86_64.mk68
-rw-r--r--system_wrappers/source/system_wrappers_tests.gyp8
-rw-r--r--test/Android.mk39
-rwxr-xr-xtest/buildbot_tests.py139
-rw-r--r--test/call_test.cc20
-rw-r--r--test/call_test.h8
-rw-r--r--test/channel_transport/OWNERS1
-rw-r--r--test/channel_transport/udp_socket2_win.h31
-rw-r--r--test/channel_transport/udp_socket_posix.cc11
-rw-r--r--test/channel_transport/udp_socket_posix.h4
-rw-r--r--test/channel_transport/udp_transport_impl.h4
-rw-r--r--test/configurable_frame_size_encoder.cc4
-rw-r--r--test/configurable_frame_size_encoder.h2
-rw-r--r--test/encoder_settings.cc17
-rw-r--r--test/fake_encoder.cc2
-rw-r--r--test/fake_encoder.h3
-rw-r--r--test/test.gyp37
-rw-r--r--test/testsupport/always_passing_unittest.cc (renamed from modules/audio_coding/main/test/ACMTest.cc)12
-rw-r--r--test/webrtc_test_common.gyp40
-rw-r--r--test/win/d3d_renderer.h1
-rw-r--r--tools/e2e_quality/audio/audio_e2e_harness.cc2
-rw-r--r--tools/rtcbot/OWNERS2
-rw-r--r--tools/rtcbot/README41
-rw-r--r--tools/rtcbot/bot/api.js37
-rw-r--r--tools/rtcbot/bot/browser/bot.js84
-rw-r--r--tools/rtcbot/bot/browser/index.html11
-rw-r--r--tools/rtcbot/botmanager.js211
-rw-r--r--tools/rtcbot/test.js85
-rw-r--r--tools/rtcbot/test/ping_pong.js19
-rw-r--r--tools/rtcbot/test/simple_offer_answer.js54
-rw-r--r--tools/rtcbot/test/webrtc_video_streaming.js94
-rw-r--r--tools/tools.gyp8
-rw-r--r--typedefs.h20
-rw-r--r--video/BUILD.gn26
-rw-r--r--video/bitrate_estimator_tests.cc20
-rw-r--r--video/call.cc94
-rw-r--r--video/call_perf_tests.cc27
-rw-r--r--video/end_to_end_tests.cc337
-rw-r--r--video/full_stack.cc8
-rw-r--r--video/loopback.cc9
-rw-r--r--video/rampup_tests.cc10
-rw-r--r--video/receive_statistics_proxy.cc2
-rw-r--r--video/receive_statistics_proxy.h2
-rw-r--r--video/send_statistics_proxy.h2
-rw-r--r--video/video_receive_stream.cc28
-rw-r--r--video/video_receive_stream.h6
-rw-r--r--video/video_send_stream.cc54
-rw-r--r--video/video_send_stream.h10
-rw-r--r--video/video_send_stream_tests.cc134
-rw-r--r--video_encoder.h74
-rw-r--r--video_engine/Android.mk93
-rw-r--r--video_engine/BUILD.gn99
-rw-r--r--video_engine/OWNERS1
-rw-r--r--video_engine/call_stats.h4
-rw-r--r--video_engine/include/vie_base.h9
-rw-r--r--video_engine/include/vie_codec.h8
-rw-r--r--video_engine/test/auto_test/android/Android.mk38
-rw-r--r--video_engine/test/auto_test/android/jni/Android.mk76
-rw-r--r--video_engine/test/auto_test/source/Android.mk64
-rw-r--r--video_engine/test/auto_test/source/vie_autotest_android.cc7
-rw-r--r--video_engine/test/auto_test/source/vie_autotest_custom_call.cc2
-rw-r--r--video_engine/test/auto_test/vie_auto_test.gypi4
-rw-r--r--video_engine/test/libvietest/include/tb_I420_codec.h33
-rw-r--r--video_engine/test/libvietest/testbed/tb_I420_codec.cc29
-rw-r--r--video_engine/video_engine_core.gypi10
-rw-r--r--video_engine/video_engine_core.target.darwin-arm.mk68
-rw-r--r--video_engine/video_engine_core.target.darwin-arm64.mk52
-rw-r--r--video_engine/video_engine_core.target.darwin-mips.mk60
-rw-r--r--video_engine/video_engine_core.target.darwin-x86.mk56
-rw-r--r--video_engine/video_engine_core.target.darwin-x86_64.mk56
-rw-r--r--video_engine/video_engine_core.target.linux-arm.mk68
-rw-r--r--video_engine/video_engine_core.target.linux-arm64.mk52
-rw-r--r--video_engine/video_engine_core.target.linux-mips.mk60
-rw-r--r--video_engine/video_engine_core.target.linux-x86.mk56
-rw-r--r--video_engine/video_engine_core.target.linux-x86_64.mk56
-rw-r--r--video_engine/vie_capturer.h2
-rw-r--r--video_engine/vie_channel.cc29
-rw-r--r--video_engine/vie_channel_group.cc16
-rw-r--r--video_engine/vie_codec_impl.cc8
-rw-r--r--video_engine/vie_codec_impl.h2
-rw-r--r--video_engine/vie_encoder.h32
-rw-r--r--video_engine/vie_impl.cc21
-rw-r--r--video_engine/vie_manager_base.h2
-rw-r--r--video_engine/vie_receiver.cc3
-rw-r--r--video_engine/vie_receiver.h6
-rw-r--r--video_engine/vie_sync_module.h4
-rw-r--r--video_frame.h219
-rw-r--r--video_receive_stream.h2
-rw-r--r--video_send_stream.h3
-rw-r--r--voice_engine/Android.mk86
-rw-r--r--voice_engine/BUILD.gn94
-rw-r--r--voice_engine/channel.cc177
-rw-r--r--voice_engine/channel.h10
-rw-r--r--voice_engine/include/voe_base.h3
-rw-r--r--voice_engine/include/voe_codec.h8
-rw-r--r--voice_engine/monitor_module.cc8
-rw-r--r--voice_engine/monitor_module.h10
-rw-r--r--voice_engine/test/android/OWNERS1
-rw-r--r--voice_engine/test/android/android_test/Android.mk25
-rw-r--r--voice_engine/test/android/android_test/jni/Android.mk152
-rw-r--r--voice_engine/test/auto_test/Android.mk56
-rw-r--r--voice_engine/test/auto_test/standard/codec_test.cc16
-rw-r--r--voice_engine/test/cmd_test/Android.mk60
-rw-r--r--voice_engine/test/cmd_test/voe_cmd_test.cc6
-rw-r--r--voice_engine/voe_codec_impl.cc10
-rw-r--r--voice_engine/voe_codec_impl.h2
-rw-r--r--voice_engine/voice_engine.gyp8
-rw-r--r--voice_engine/voice_engine.target.darwin-arm.mk68
-rw-r--r--voice_engine/voice_engine.target.darwin-arm64.mk52
-rw-r--r--voice_engine/voice_engine.target.darwin-mips.mk60
-rw-r--r--voice_engine/voice_engine.target.darwin-x86.mk56
-rw-r--r--voice_engine/voice_engine.target.darwin-x86_64.mk56
-rw-r--r--voice_engine/voice_engine.target.linux-arm.mk68
-rw-r--r--voice_engine/voice_engine.target.linux-arm64.mk52
-rw-r--r--voice_engine/voice_engine.target.linux-mips.mk60
-rw-r--r--voice_engine/voice_engine.target.linux-x86.mk56
-rw-r--r--voice_engine/voice_engine.target.linux-x86_64.mk56
-rw-r--r--webrtc.gyp21
-rw-r--r--webrtc.target.darwin-arm.mk68
-rw-r--r--webrtc.target.darwin-arm64.mk52
-rw-r--r--webrtc.target.darwin-mips.mk60
-rw-r--r--webrtc.target.darwin-x86.mk56
-rw-r--r--webrtc.target.darwin-x86_64.mk56
-rw-r--r--webrtc.target.linux-arm.mk68
-rw-r--r--webrtc.target.linux-arm64.mk52
-rw-r--r--webrtc.target.linux-mips.mk60
-rw-r--r--webrtc.target.linux-x86.mk56
-rw-r--r--webrtc.target.linux-x86_64.mk56
-rw-r--r--webrtc_common.target.darwin-arm.mk68
-rw-r--r--webrtc_common.target.darwin-arm64.mk52
-rw-r--r--webrtc_common.target.darwin-mips.mk60
-rw-r--r--webrtc_common.target.darwin-x86.mk56
-rw-r--r--webrtc_common.target.darwin-x86_64.mk56
-rw-r--r--webrtc_common.target.linux-arm.mk68
-rw-r--r--webrtc_common.target.linux-arm64.mk52
-rw-r--r--webrtc_common.target.linux-mips.mk60
-rw-r--r--webrtc_common.target.linux-x86.mk56
-rw-r--r--webrtc_common.target.linux-x86_64.mk56
-rw-r--r--webrtc_examples.gyp4
-rw-r--r--webrtc_tests.gypi31
1127 files changed, 43369 insertions, 30984 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 04618bfb..a361fc26 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -23,7 +23,6 @@ config("common_inherited_config") {
if (build_with_chromium) {
defines = [
"WEBRTC_CHROMIUM_BUILD",
- "LOGGING_INSIDE_WEBRTC",
]
include_dirs = [
# overrides must be included first as that is the mechanism for
@@ -57,24 +56,26 @@ config("common_inherited_config") {
"WEBRTC_LINUX",
"WEBRTC_ANDROID",
]
- if (enable_android_opensl) {
+ if (rtc_enable_android_opensl) {
defines += [ "WEBRTC_ANDROID_OPENSLES" ]
}
}
}
-if (have_dbus_glib) {
+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
@@ -83,11 +84,13 @@ config("common_config") {
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
@@ -213,5 +216,11 @@ source_set("webrtc_common") {
"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/base/BUILD.gn b/base/BUILD.gn
index 68c8f453..fbed1a52 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -6,8 +6,6 @@
# 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 base.gyp changes after r6438.
-
import("//build/config/crypto.gni")
import("//build/config/ui.gni")
import("../build/webrtc.gni")
@@ -20,7 +18,8 @@ config("webrtc_base_config") {
defines = [
"FEATURE_ENABLE_SSL",
- "GTEST_RELATIVE_PATH",
+ "LOGGING=1",
+ "USE_WEBRTC_DEV_BRANCH",
]
# TODO(henrike): issue 3307, make webrtc_base build without disabling
@@ -103,11 +102,44 @@ if (is_linux && !build_with_chromium) {
}
}
+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",
+ "stringencode.cc",
+ "stringencode.h",
+ "stringutils.cc",
+ "stringutils.h",
+ "thread_annotations.h",
+ "timeutils.cc",
+ "timeutils.h",
+ ]
+}
static_library("webrtc_base") {
cflags = []
cflags_cc = []
- deps= []
+ libs = []
+ deps = [
+ ":rtc_base_approved",
+ ]
configs += [
"..:common_config",
@@ -144,8 +176,6 @@ static_library("webrtc_base") {
"bytebuffer.cc",
"bytebuffer.h",
"byteorder.h",
- "checks.cc",
- "checks.h",
"common.cc",
"common.h",
"cpumonitor.cc",
@@ -181,9 +211,6 @@ static_library("webrtc_base") {
"ipaddress.h",
"linked_ptr.h",
"mathutils.h",
- "md5.cc",
- "md5.h",
- "md5digest.h",
"messagedigest.cc",
"messagedigest.h",
"messagehandler.cc",
@@ -250,10 +277,6 @@ static_library("webrtc_base") {
"sslstreamadapterhelper.h",
"stream.cc",
"stream.h",
- "stringencode.cc",
- "stringencode.h",
- "stringutils.cc",
- "stringutils.h",
"systeminfo.cc",
"systeminfo.h",
"task.cc",
@@ -264,8 +287,9 @@ static_library("webrtc_base") {
"taskrunner.h",
"thread.cc",
"thread.h",
- "timeutils.cc",
- "timeutils.h",
+ "thread_checker.h",
+ "thread_checker_impl.cc",
+ "thread_checker_impl.h",
"timing.cc",
"timing.h",
"urlencode.cc",
@@ -388,13 +412,6 @@ static_library("webrtc_base") {
]
}
- if (use_x11) {
- sources += [
- "x11windowpicker.cc",
- "x11windowpicker.h",
- ]
- }
-
if (is_mac) {
sources += [
"macasyncsocket.cc",
@@ -420,10 +437,23 @@ static_library("webrtc_base") {
"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 with the Chromium default
# compiler settings.
configs -= [ "//build/config/compiler:chromium_code" ]
@@ -433,8 +463,11 @@ static_library("webrtc_base") {
if (use_openssl) {
direct_dependent_configs += [ ":openssl_config" ]
-
- deps += [ "//third_party/boringssl" ]
+ if (rtc_build_ssl) {
+ deps += [ "//third_party/boringssl" ]
+ } else {
+ configs += [ "external_ssl_library" ]
+ }
} else {
direct_dependent_configs += [ ":no_openssl_config" ]
}
@@ -447,7 +480,7 @@ static_library("webrtc_base") {
direct_dependent_configs += [ ":android_config" ]
- libs = [
+ libs += [
"log",
"GLESv2"
]
@@ -458,12 +491,19 @@ static_library("webrtc_base") {
if (is_ios) {
all_dependent_configs += [ ":ios_config" ]
- deps += [ "//net/third_party/nss/ssl:libssl" ]
+ if (rtc_build_ssl) {
+ deps += [ "//net/third_party/nss/ssl:libssl" ]
+ } else {
+ configs += [ "external_ssl_library" ]
+ }
}
- if (is_linux) {
- libs = [
- "crypto",
+ if (use_x11) {
+ sources += [
+ "x11windowpicker.cc",
+ "x11windowpicker.h",
+ ]
+ libs += [
"dl",
"rt",
"Xext",
@@ -471,7 +511,17 @@ static_library("webrtc_base") {
"Xcomposite",
"Xrender",
]
- configs += [ "//third_party/nss:system_nss_no_ssl_config" ]
+ }
+
+ if (is_linux) {
+ libs += [
+ "crypto",
+ "dl",
+ "rt",
+ ]
+ if (rtc_build_ssl) {
+ configs += [ "//third_party/nss:system_nss_no_ssl_config" ]
+ }
}
if (is_mac) {
@@ -486,7 +536,7 @@ static_library("webrtc_base") {
all_dependent_configs = [ ":mac_config" ]
- libs = [
+ libs += [
"crypto", # $(SDKROOT)/usr/lib/libcrypto.dylib
"ssl", # $(SDKROOT)/usr/lib/libssl.dylib
]
@@ -514,7 +564,7 @@ static_library("webrtc_base") {
"winping.h",
]
- libs = [
+ libs += [
"crypt32.lib",
"iphlpapi.lib",
"secur32.lib",
@@ -530,7 +580,7 @@ static_library("webrtc_base") {
}
if (is_posix && is_debug) {
- # Chromium's build/common.gypi defines this for all posix
+ # 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" ]
@@ -540,7 +590,7 @@ static_library("webrtc_base") {
defines += [ "CARBON_DEPRECATED=YES" ]
}
- if (!is_ios && is_posix) {
+ if (!is_ios) {
sources += [
"openssl.h",
"openssladapter.cc",
@@ -562,18 +612,26 @@ static_library("webrtc_base") {
}
if (is_mac || is_ios || is_win) {
- deps += [
- "//net/third_party/nss/ssl:libssl",
- "//third_party/nss:nspr",
- "//third_party/nss:nss",
- ]
+ 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_posix && !is_mac && !is_ios && !is_android) {
if (build_with_chromium) {
deps += [ "//crypto:platform" ]
} else {
- deps += [ ":linux_system_ssl" ]
+ if (rtc_build_ssl) {
+ deps += [ ":linux_system_ssl" ]
+ } else {
+ configs += [ "external_ssl_library" ]
+ }
}
}
}
diff --git a/base/OWNERS b/base/OWNERS
index d292dfdb..1a24a6a8 100644
--- a/base/OWNERS
+++ b/base/OWNERS
@@ -1,9 +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
+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 0bfd795b..4748de76 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 @@ class AsyncHttpRequestTest : public testing::Test,
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 @@ TEST_F(AsyncHttpRequestTest, TestGetSuccess) {
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 @@ TEST_F(AsyncHttpRequestTest, TestGetNotFound) {
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 @@ TEST_F(AsyncHttpRequestTest, DISABLED_TestGetToInvalidHostname) {
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 @@ TEST_F(AsyncHttpRequestTest, TestPostSuccess) {
}
// 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 @@ TEST_F(AsyncHttpRequestTest, TestCancel) {
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 80f220f2..782bc258 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 @@ class AutoDetectProxyTest : public testing::Test, public sigslot::has_slots<> {
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 0e5845e7..fa92707c 100644
--- a/base/base.gyp
+++ b/base/base.gyp
@@ -25,11 +25,44 @@
],
'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',
+ '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 +99,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',
@@ -85,8 +116,6 @@
'diskcache_win32.h',
'event.cc',
'event.h',
- 'exp_filter.cc',
- 'exp_filter.h',
'filelock.cc',
'filelock.h',
'fileutils.cc',
@@ -145,9 +174,6 @@
'macwindowpicker.cc',
'macwindowpicker.h',
'mathutils.h',
- 'md5.cc',
- 'md5.h',
- 'md5digest.h',
'messagedigest.cc',
'messagedigest.h',
'messagehandler.cc',
@@ -252,10 +278,6 @@
'stream.cc',
'stream.h',
'stringdigest.h',
- 'stringencode.cc',
- 'stringencode.h',
- 'stringutils.cc',
- 'stringutils.h',
'systeminfo.cc',
'systeminfo.h',
'task.cc',
@@ -271,8 +293,6 @@
'thread_checker.h',
'thread_checker_impl.cc',
'thread_checker_impl.h',
- 'timeutils.cc',
- 'timeutils.h',
'timing.cc',
'timing.h',
'transformadapter.cc',
@@ -317,7 +337,7 @@
'../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',
@@ -332,7 +352,6 @@
],
'defines': [
'FEATURE_ENABLE_SSL',
- 'GTEST_RELATIVE_PATH',
],
},
'include_dirs': [
@@ -502,18 +521,22 @@
}],
],
}, {
- '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',
+ ],
+ },
+ }],
],
- 'direct_dependent_settings': {
- 'defines': [
- 'SSL_USE_NSS',
- 'HAVE_NSS_SSL_H',
- 'SSL_USE_NSS_RNG',
- ],
- },
}],
['OS == "android"', {
'defines': [
@@ -531,16 +554,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',
@@ -589,7 +616,6 @@
['OS=="linux"', {
'link_settings': {
'libraries': [
- '-lcrypto',
'-ldl',
'-lrt',
],
diff --git a/base/base_tests.gyp b/base/base_tests.gyp
index 3cef1028..2d99e810 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,136 +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',
- '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': [
- '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 0f67c764..b85af1ed 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);
+}
+
+// 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
+}
- LOG(LS_ERROR) << "\n\n#\n# Fatal error in " << file
- << ", line " << line << "\n# " << msg
- << "\n#\n";
+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 b85b50ae..821b75be 100644
--- a/base/checks.h
+++ b/base/checks.h
@@ -8,30 +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 <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
-} // namespace rtc
+// 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
-// Trigger a fatal error (which aborts the process and prints an error
-// message). FATAL_ERROR_IF may seem a lot like assert, but there's a crucial
-// difference: it's always "on". This means that it can be used to check for
-// regular errors that could actually happen, not just programming errors that
-// supposedly can't happen---but triggering a fatal error will kill the process
-// in an ugly way, so it's not suitable for catching errors that might happen
-// in production.
-#define FATAL_ERROR(msg) do { rtc::Fatal(__FILE__, __LINE__, msg); } while (0)
-#define FATAL_ERROR_IF(x) do { if (x) FATAL_ERROR("check failed"); } while (0)
-
-// The UNREACHABLE macro is very useful during development.
-#define UNREACHABLE() FATAL_ERROR("unreachable code")
+#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
#endif // WEBRTC_BASE_CHECKS_H_
diff --git a/base/cpumonitor_unittest.cc b/base/cpumonitor_unittest.cc
index 6d9af5ae..1546f558 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 @@ TEST(CpuMonitorTest, TestGetSystemLoadForceFallback) {
#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 a950a47f..a2d9bca0 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 @@ class CriticalSection {
~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 @@ class CriticalSection {
#endif // WEBRTC_WIN
#if defined(WEBRTC_POSIX)
-class CriticalSection {
+class LOCKABLE CriticalSection {
public:
CriticalSection() {
pthread_mutexattr_t mutex_attribute;
@@ -84,18 +85,18 @@ class CriticalSection {
~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 @@ class CriticalSection {
#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 e1b05cb0..69f74fa2 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 @@ TEST(AtomicOpsTest, Simple) {
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 @@ TEST(AtomicOpsTest, Increment) {
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/filelock_unittest.cc b/base/filelock_unittest.cc
index eecbf07d..536204ec 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 @@ TEST_F(FileLockTest, TestLockX2) {
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/flags.cc b/base/flags.cc
index fe7a334a..a5e1c45e 100644
--- a/base/flags.cc
+++ b/base/flags.cc
@@ -56,7 +56,7 @@ void Flag::SetToDefault() {
variable_->s = default_.s;
return;
}
- UNREACHABLE();
+ FATAL() << "unreachable code";
}
@@ -67,8 +67,7 @@ static const char* Type2String(Flag::Type type) {
case Flag::FLOAT: return "float";
case Flag::STRING: return "string";
}
- UNREACHABLE();
- return NULL;
+ FATAL() << "unreachable code";
}
@@ -87,7 +86,7 @@ static void PrintFlagValue(Flag::Type type, FlagValue* p) {
printf("%s", p->s);
return;
}
- UNREACHABLE();
+ FATAL() << "unreachable code";
}
@@ -164,8 +163,7 @@ void FlagList::SplitArgument(const char* arg,
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 @@ int FlagList::SetFlagsFromCommandLine(int* argc, const char** argv,
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 @@ WindowsCommandLineArguments::~WindowsCommandLineArguments() {
delete[] argv_;
}
-#endif // WEBRTC_WIN
+#endif // WEBRTC_WIN
} // namespace rtc
diff --git a/base/gunit.h b/base/gunit.h
index 6d9c06fe..7431fcf3 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 62567721..fe34f7c9 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 @@ HttpCacheState HttpGetCacheState(const HttpTransaction& t) {
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 @@ HttpCacheState HttpGetCacheState(const HttpTransaction& t) {
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 @@ HttpCacheState HttpGetCacheState(const HttpTransaction& t) {
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 @@ HttpError HttpClient::ReadCacheBody(const std::string& id) {
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 569b7b3a..561d2f49 100644
--- a/base/httpcommon.cc
+++ b/base/httpcommon.cc
@@ -364,7 +364,7 @@ bool HttpDateToSeconds(const std::string& date, time_t* seconds) {
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 @@ bool HttpDateToSeconds(const std::string& date, time_t* seconds) {
}
// 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;
diff --git a/base/ifaddrs-android.cc b/base/ifaddrs-android.cc
index c8363d56..d8d28a5b 100644
--- a/base/ifaddrs-android.cc
+++ b/base/ifaddrs-android.cc
@@ -218,6 +218,6 @@ void freeifaddrs(struct ifaddrs* addrs) {
delete last;
}
}
-#endif // defined(WEBRTC_ANDROID)
} // namespace rtc
+#endif // defined(WEBRTC_ANDROID)
diff --git a/base/ipaddress.cc b/base/ipaddress.cc
index 4441e16f..4f311d5a 100644
--- a/base/ipaddress.cc
+++ b/base/ipaddress.cc
@@ -186,6 +186,30 @@ void IPAddress::set_strip_sensitive(bool enable) {
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 @@ bool IPFromString(const std::string& str, IPAddress* out) {
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 e7d649ac..12db5c5b 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 @@ class IPAddress {
::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 @@ class IPAddress {
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 @@ class IPAddress {
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 657595f6..e8473351 100644
--- a/base/ipaddress_unittest.cc
+++ b/base/ipaddress_unittest.cc
@@ -856,4 +856,41 @@ TEST(IPAddressTest, TestToSensitiveString) {
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/logging_unittest.cc b/base/logging_unittest.cc
index 59630d74..aa438376 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 @@ class LogThread : public Thread {
}
};
-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 7bf9e920..59ae6c4c 100644
--- a/base/maccocoathreadhelper.mm
+++ b/base/maccocoathreadhelper.mm
@@ -23,12 +23,7 @@ void InitCocoaMultiThreading() {
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 @@ void InitCocoaMultiThreading() {
[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 e98be918..4c0432af 100644
--- a/base/macsocketserver_unittest.cc
+++ b/base/macsocketserver_unittest.cc
@@ -33,7 +33,7 @@ class WakeThread : public Thread {
#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(MacCFSocketServerTest, TestWait) {
}
// 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(MacCFSocketServerTest, TestWakeup) {
}
// 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(MacCarbonSocketServerTest, TestWait) {
}
// 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(MacCarbonSocketServerTest, TestWakeup) {
}
// 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(MacCarbonAppSocketServerTest, TestWait) {
}
// 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 @@ class MacAsyncSocketTest : public SocketTest {
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 @@ TEST_F(MacAsyncSocketTest, DISABLED_TestConnectFailIPv4) {
SocketTest::TestConnectFailIPv4();
}
-TEST_F(MacAsyncSocketTest, TestConnectFailIPv6) {
+TEST_F(MacAsyncSocketTest, DISABLED_TestConnectFailIPv6) {
SocketTest::TestConnectFailIPv6();
}
@@ -136,11 +136,11 @@ TEST_F(MacAsyncSocketTest, DISABLED_TestConnectWithDnsLookupFailIPv6) {
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 @@ TEST_F(MacAsyncSocketTest, DISABLED_TestServerCloseDuringConnectIPv6) {
}
// 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 @@ class MacCarbonAppAsyncSocketTest : public MacAsyncSocketTest {
};
};
-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 78024e0b..2027d91e 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 @@ TEST_F(MessageQueueTest,
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 8b9d8a15..19c1225c 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 @@ void TestPhysicalInternal(const SocketAddress& int_addr) {
// 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 @@ void TestPhysicalInternal(const SocketAddress& int_addr) {
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 @@ void TestVirtualInternal(int family) {
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 d94c69ea..c1f978b9 100644
--- a/base/network.cc
+++ b/base/network.cc
@@ -65,6 +65,11 @@ const int kNetworksUpdateIntervalMs = 2000;
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 @@ bool SortNetworks(const Network* a, const Network* b) {
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::GetNetworks(NetworkList* result) const {
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 @@ void NetworkManagerBase::MergeNetworkList(const NetworkList& new_networks,
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 @@ void NetworkManagerBase::MergeNetworkList(const NetworkList& new_networks,
}
// 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 @@ bool BasicNetworkManager::CreateNetworks(bool include_ignored,
}
return true;
}
-#endif // WEBRTC_WIN
+#endif // WEBRTC_WIN
#if defined(WEBRTC_LINUX)
bool IsDefaultRoute(const std::string& network_name) {
@@ -622,27 +639,17 @@ Network::Network(const std::string& name, const std::string& desc,
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 @@ bool Network::SetIPs(const std::vector<IPAddress>& ips, bool changed) {
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 855b1b74..6f9d08e7 100644
--- a/base/network.h
+++ b/base/network.h
@@ -188,23 +188,37 @@ class Network {
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 @@ class Network {
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 431f8b4e..acb118d4 100644
--- a/base/network_unittest.cc
+++ b/base/network_unittest.cc
@@ -114,7 +114,7 @@ TEST_F(NetworkTest, DISABLED_TestCreateNetworks) {
++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 @@ TEST_F(NetworkTest, TestIgnoreNonDefaultRoutes) {
}
#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 f4b2d311..40c017fb 100644
--- a/base/nssstreamadapter.cc
+++ b/base/nssstreamadapter.cc
@@ -486,6 +486,8 @@ int NSSStreamAdapter::BeginSSL() {
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);
diff --git a/base/nullsocketserver_unittest.cc b/base/nullsocketserver_unittest.cc
index fe21f6ad..6d3eb52b 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 @@ class NullSocketServerTest
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/opensslidentity.cc b/base/opensslidentity.cc
index 915680ce..30ac6e24 100644
--- a/base/opensslidentity.cc
+++ b/base/opensslidentity.cc
@@ -253,13 +253,11 @@ OpenSSLCertificate::~OpenSSLCertificate() {
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 @@ void OpenSSLCertificate::ToDER(Buffer* der_buffer) const {
// 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 5eaeb1b5..070a948b 100644
--- a/base/opensslstreamadapter.cc
+++ b/base/opensslstreamadapter.cc
@@ -615,6 +615,16 @@ int OpenSSLStreamAdapter::BeginSSL() {
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();
}
@@ -733,8 +743,15 @@ SSL_CTX* OpenSSLStreamAdapter::SetupSSLContext() {
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 df750adb..4d57e730 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 @@ TEST_F(PhysicalSocketTest, TestCloseInClosedCallbackIPv6) {
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();
}
@@ -206,7 +207,7 @@ Thread *PosixSignalDeliveryTest::signaled_thread_ = NULL;
// 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));
@@ -216,7 +217,7 @@ TEST_F(PosixSignalDeliveryTest, RaiseThenWait) {
// 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) {
@@ -231,7 +232,7 @@ TEST_F(PosixSignalDeliveryTest, InsanelyManySignals) {
}
// 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));
@@ -256,7 +257,7 @@ class RaiseSigTermRunnable : public Runnable {
// 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/proxy_unittest.cc b/base/proxy_unittest.cc
index d8a523fe..a1ade0c7 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 @@ class ProxyTest : public testing::Test {
};
// 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 @@ TEST_F(ProxyTest, TestHttpsConnect) {
*/
// 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 @@ TEST_F(ProxyTest, TestAutoDetectHttps) {
*/
// 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 00000000..9f4dbecf
--- /dev/null
+++ b/base/rtc_base.target.darwin-arm.mk
@@ -0,0 +1,374 @@
+# 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/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/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
+
+
+# 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_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/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_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/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 00000000..24798190
--- /dev/null
+++ b/base/rtc_base.target.darwin-arm64.mk
@@ -0,0 +1,344 @@
+# 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/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/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
+
+
+# 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_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/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_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/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 00000000..dae1aeb5
--- /dev/null
+++ b/base/rtc_base.target.darwin-mips.mk
@@ -0,0 +1,358 @@
+# 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/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/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
+
+
+# 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 \
+ -mhard-float \
+ -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' \
+ '-DMIPS32_LE' \
+ '-DMIPS_FPU_LE' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-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/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 \
+ -mhard-float \
+ -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' \
+ '-DMIPS32_LE' \
+ '-DMIPS_FPU_LE' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-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/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 00000000..50369e65
--- /dev/null
+++ b/base/rtc_base.target.darwin-x86.mk
@@ -0,0 +1,356 @@
+# 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/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/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
+
+
+# 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_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/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_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/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 00000000..ca8a9f00
--- /dev/null
+++ b/base/rtc_base.target.darwin-x86_64.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_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/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/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
+
+
+# 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_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/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_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/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 00000000..9f4dbecf
--- /dev/null
+++ b/base/rtc_base.target.linux-arm.mk
@@ -0,0 +1,374 @@
+# 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/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/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
+
+
+# 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_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/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_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/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 00000000..24798190
--- /dev/null
+++ b/base/rtc_base.target.linux-arm64.mk
@@ -0,0 +1,344 @@
+# 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/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/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
+
+
+# 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_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/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_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/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 00000000..dae1aeb5
--- /dev/null
+++ b/base/rtc_base.target.linux-mips.mk
@@ -0,0 +1,358 @@
+# 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/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/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
+
+
+# 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 \
+ -mhard-float \
+ -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' \
+ '-DMIPS32_LE' \
+ '-DMIPS_FPU_LE' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-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/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 \
+ -mhard-float \
+ -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' \
+ '-DMIPS32_LE' \
+ '-DMIPS_FPU_LE' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-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/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 00000000..50369e65
--- /dev/null
+++ b/base/rtc_base.target.linux-x86.mk
@@ -0,0 +1,356 @@
+# 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/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/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
+
+
+# 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_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/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_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/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 00000000..ca8a9f00
--- /dev/null
+++ b/base/rtc_base.target.linux-x86_64.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_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/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/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
+
+
+# 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_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/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_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/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 00000000..192b17a7
--- /dev/null
+++ b/base/rtc_base_approved.target.darwin-arm.mk
@@ -0,0 +1,296 @@
+# 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/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 00000000..6cfd2645
--- /dev/null
+++ b/base/rtc_base_approved.target.darwin-arm64.mk
@@ -0,0 +1,266 @@
+# 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/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 00000000..b1c30e1c
--- /dev/null
+++ b/base/rtc_base_approved.target.darwin-mips.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_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/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 \
+ -mhard-float \
+ -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' \
+ '-DMIPS32_LE' \
+ '-DMIPS_FPU_LE' \
+ '-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 \
+ -mhard-float \
+ -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' \
+ '-DMIPS32_LE' \
+ '-DMIPS_FPU_LE' \
+ '-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 00000000..3ab741ce
--- /dev/null
+++ b/base/rtc_base_approved.target.darwin-x86.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_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/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 00000000..cf60501e
--- /dev/null
+++ b/base/rtc_base_approved.target.darwin-x86_64.mk
@@ -0,0 +1,276 @@
+# 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/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 00000000..192b17a7
--- /dev/null
+++ b/base/rtc_base_approved.target.linux-arm.mk
@@ -0,0 +1,296 @@
+# 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/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 00000000..6cfd2645
--- /dev/null
+++ b/base/rtc_base_approved.target.linux-arm64.mk
@@ -0,0 +1,266 @@
+# 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/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 00000000..b1c30e1c
--- /dev/null
+++ b/base/rtc_base_approved.target.linux-mips.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_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/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 \
+ -mhard-float \
+ -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' \
+ '-DMIPS32_LE' \
+ '-DMIPS_FPU_LE' \
+ '-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 \
+ -mhard-float \
+ -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' \
+ '-DMIPS32_LE' \
+ '-DMIPS_FPU_LE' \
+ '-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 00000000..3ab741ce
--- /dev/null
+++ b/base/rtc_base_approved.target.linux-x86.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_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/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 00000000..cf60501e
--- /dev/null
+++ b/base/rtc_base_approved.target.linux-x86_64.mk
@@ -0,0 +1,276 @@
+# 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/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/sharedexclusivelock.h b/base/sharedexclusivelock.h
index f64d7cf5..aaaba3b8 100644
--- a/base/sharedexclusivelock.h
+++ b/base/sharedexclusivelock.h
@@ -19,14 +19,14 @@ namespace rtc {
// 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 @@ class SharedExclusiveLock {
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 @@ class SharedScope {
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 42334af7..ea406cf9 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 @@ TEST_F(SharedExclusiveLockTest, DISABLED_TestSharedShared) {
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 @@ TEST_F(SharedExclusiveLockTest, TestSharedExclusive) {
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 @@ TEST_F(SharedExclusiveLockTest, TestExclusiveShared) {
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 a97bda1a..8e18be61 100644
--- a/base/signalthread.h
+++ b/base/signalthread.h
@@ -115,16 +115,17 @@ class SignalThread
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 e0ea54eb..3f534312 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 @@ class OwnerThread : public Thread, public sigslot::has_slots<> {
// 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 @@ TEST_F(SignalThreadTest, OwnerThreadGoesAway) {
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 @@ TEST_F(SignalThreadTest, ThreadFinishes) {
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 @@ TEST_F(SignalThreadTest, ReleasedThreadFinishes) {
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 @@ TEST_F(SignalThreadTest, DestroyedThreadCleansUp) {
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 1cdd1bcb..137597fd 100644
--- a/base/socketadapters.cc
+++ b/base/socketadapters.cc
@@ -749,7 +749,7 @@ void AsyncSocksProxyServerSocket::HandleHello(ByteBuffer* request) {
}
}
-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 @@ void AsyncSocksProxyServerSocket::HandleAuth(ByteBuffer* request) {
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 3292df28..ddf4f18b 100644
--- a/base/socketadapters.h
+++ b/base/socketadapters.h
@@ -195,9 +195,9 @@ class AsyncSocksProxyServerSocket : public AsyncProxyServerSocket {
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 e6717e4b..b15c0c48 100644
--- a/base/socketaddress.cc
+++ b/base/socketaddress.cc
@@ -121,7 +121,7 @@ void SocketAddress::SetResolvedIP(const IPAddress& ip) {
void SocketAddress::SetPort(int port) {
ASSERT((0 <= port) && (port < 65536));
- port_ = port;
+ port_ = static_cast<uint16>(port);
}
uint32 SocketAddress::ip() const {
@@ -279,9 +279,9 @@ bool SocketAddress::FromSockAddr(const sockaddr_in& saddr) {
}
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/ssladapter_unittest.cc b/base/ssladapter_unittest.cc
new file mode 100644
index 00000000..6d4536d2
--- /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 ffe6b2f7..ea966c54 100644
--- a/base/sslstreamadapter.h
+++ b/base/sslstreamadapter.h
@@ -48,11 +48,15 @@ class SSLStreamAdapter : public StreamAdapterInterface {
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 @@ class SSLStreamAdapter : public StreamAdapterInterface {
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 af78bfff..f7dcb71e 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_F(SSLStreamAdapterTestDTLS,
};
// 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 a6664d71..5c2cb576 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 @@ TEST(FifoBufferTest, WriteOffsetAndReadOffset) {
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 1e0a1493..52b75da7 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 @@ namespace rtc {
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 escape(char * buffer, size_t buflen,
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 unescape(char * buffer, size_t buflen,
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 @@ const char* unsafe_filename_characters() {
// 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 utf8_encode(char* buffer, size_t buflen, unsigned long value) {
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 @@ size_t html_encode(char * buffer, size_t buflen,
case '\'': escseq = "&#39;"; esclen = 5; break;
case '\"': escseq = "&quot;"; esclen = 6; break;
case '&': escseq = "&amp;"; esclen = 5; break;
- default: ASSERT(false);
+ default: DCHECK(false);
}
if (bufpos + esclen >= buflen) {
break;
@@ -287,7 +287,8 @@ size_t html_encode(char * buffer, size_t buflen,
}
} else {
// Largest value is 0x1FFFFF => &#2097151; (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 @@ size_t html_encode(char * buffer, size_t buflen,
// 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_encode(char * buffer, size_t buflen,
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 @@ size_t xml_encode(char * buffer, size_t buflen,
case '\'': escseq = "&apos;"; esclen = 6; break;
case '\"': escseq = "&quot;"; esclen = 6; break;
case '&': escseq = "&amp;"; esclen = 5; break;
- default: ASSERT(false);
+ default: DCHECK(false);
}
if (bufpos + esclen >= buflen) {
break;
@@ -348,7 +349,7 @@ size_t xml_encode(char * buffer, size_t buflen,
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 @@ size_t xml_decode(char * buffer, size_t buflen,
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(char* buffer, size_t buflen,
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 @@ std::string hex_encode_with_delimiter(const char* source, size_t srclen,
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(char * cbuffer, size_t buflen,
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 @@ std::string s_transform(const std::string& source, Transform t) {
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 tokenize(const std::string& source, char delimiter, char start_mark,
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 b6c666f9..2e69a9c0 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 @@ size_t tokenize(const std::string& source, char delimiter, char start_mark,
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 @@ static bool ToString(const T &t, std::string* s) {
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 041708d3..cb99c254 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 @@ int ascii_string_compare(const wchar_t* s1, const char* s2, size_t n,
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 @@ size_t asccpyn(wchar_t* buffer, size_t buflen,
#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 213c272b..c8d2c782 100644
--- a/base/systeminfo.cc
+++ b/base/systeminfo.cc
@@ -259,7 +259,7 @@ std::string SystemInfo::GetCpuVendor() {
__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 8831259c..b74c29fe 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 @@ class TaskTest : public sigslot::has_slots<> {
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 @@ class TaskAbortTest : public sigslot::has_slots<> {
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 @@ class AbortShouldWakeTest : public sigslot::has_slots<> {
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 @@ class TimeoutChangeTest : public sigslot::has_slots<> {
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 @@ class DeleteTestTaskRunner : public TaskRunner {
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 @@ TEST(unstarted_task_test, DeleteTask) {
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 @@ TEST(unstarted_task_test, DoNotDeleteTask1) {
// 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 c2826686..21a70555 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 @@ void TestTcpInternal(const SocketAddress& loopback) {
}
// 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 @@ TEST(TestClientTest, TestUdpIPv6) {
}
// 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 6da9a7fb..40257ab8 100644
--- a/base/thread.cc
+++ b/base/thread.cc
@@ -107,7 +107,7 @@ Thread *ThreadManager::WrapCurrentThread() {
Thread* result = CurrentThread();
if (NULL == result) {
result = new Thread();
- result->WrapCurrentWithThreadManager(this);
+ result->WrapCurrentWithThreadManager(this, true);
}
return result;
}
@@ -188,6 +188,7 @@ bool Thread::SetName(const std::string& name, const void* obj) {
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);
@@ -288,12 +289,35 @@ bool Thread::Start(Runnable* runnable) {
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;
@@ -387,15 +411,12 @@ void Thread::Stop() {
}
void Thread::Send(MessageHandler *phandler, uint32 id, MessageData *pdata) {
- AssertBlockingIsAllowedOnCurrentThread();
-
if (fStop_)
return;
// 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;
@@ -405,6 +426,8 @@ void Thread::Send(MessageHandler *phandler, uint32 id, MessageData *pdata) {
return;
}
+ AssertBlockingIsAllowedOnCurrentThread();
+
AutoThread thread;
Thread *current_thread = Thread::Current();
ASSERT(current_thread != NULL); // AutoThread ensures this
@@ -427,7 +450,9 @@ void Thread::Send(MessageHandler *phandler, uint32 id, MessageData *pdata) {
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();
@@ -451,17 +476,23 @@ void Thread::Send(MessageHandler *phandler, uint32 id, MessageData *pdata) {
}
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();
@@ -469,6 +500,18 @@ void Thread::ReceiveSends() {
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_);
@@ -526,43 +569,32 @@ bool Thread::ProcessMessages(int cmsLoop) {
}
}
-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 742ba6dc..34ec45e3 100644
--- a/base/thread.h
+++ b/base/thread.h
@@ -165,7 +165,6 @@ class Thread : public MessageQueue {
// See ScopedDisallowBlockingCalls for details.
template <class ReturnT, class FunctorT>
ReturnT Invoke(const FunctorT& functor) {
- AssertBlockingIsAllowedOnCurrentThread();
FunctorMessageHandler<ReturnT, FunctorT> handler(functor);
Send(&handler);
return handler.result();
@@ -202,15 +201,6 @@ class Thread : public MessageQueue {
}
#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
@@ -219,14 +209,26 @@ class Thread : public MessageQueue {
// of whatever code is conditionally executing because of the return value!
bool RunningForTest() { return running(); }
- protected:
- // Blocks the calling thread until this thread has terminated.
- void Join();
-
// 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;
@@ -237,11 +239,24 @@ class Thread : public MessageQueue {
// 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_;
diff --git a/system_wrappers/interface/thread_annotations.h b/base/thread_annotations.h
index 612242d6..612242d6 100644
--- a/system_wrappers/interface/thread_annotations.h
+++ b/base/thread_annotations.h
diff --git a/base/thread_checker_unittest.cc b/base/thread_checker_unittest.cc
index 13c1da5e..25b9f503 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 @@ class ThreadCheckerClass : public ThreadChecker {
// Verifies that it was called on the same thread as the constructor.
void DoStuff() {
- assert(CalledOnValidThread());
+ DCHECK(CalledOnValidThread());
}
void DetachFromThread() {
@@ -105,7 +105,7 @@ class DeleteThreadCheckerClassOnThread : public Thread {
} // namespace
-TEST(ThreadCheckerTest, CallsAllowedOnSameThread) {
+TEST(ThreadCheckerTest, DISABLED_ON_MAC(CallsAllowedOnSameThread)) {
scoped_ptr<ThreadCheckerClass> thread_checker_class(
new ThreadCheckerClass);
@@ -116,7 +116,7 @@ TEST(ThreadCheckerTest, CallsAllowedOnSameThread) {
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 @@ TEST(ThreadCheckerTest, DestructorAllowedOnDifferentThread) {
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 @@ void ThreadCheckerClass::MethodOnDifferentThreadImpl() {
}
#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 6a54ac7b..57b6df66 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 @@ class CustomThread : public rtc::Thread {
CustomThread() {}
virtual ~CustomThread() { Stop(); }
bool Start() { return false; }
+
+ bool WrapCurrent() {
+ return Thread::WrapCurrent();
+ }
+ void UnwrapCurrent() {
+ Thread::UnwrapCurrent();
+ }
};
@@ -191,7 +199,7 @@ TEST(ThreadTest, DISABLED_Main) {
// 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(ThreadTest, Names) {
// 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, Priorities) {
}
-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 @@ TEST(ThreadTest, Wrap) {
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 @@ TEST(ThreadTest, Invoke) {
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 @@ class AsyncInvokeTest : public testing::Test {
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 @@ TEST_F(AsyncInvokeTest, FireAndForget) {
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 @@ TEST_F(AsyncInvokeTest, WithCallback) {
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 @@ TEST_F(AsyncInvokeTest, CancelInvoker) {
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 @@ TEST_F(AsyncInvokeTest, CancelCallingThread) {
EXPECT_EQ(0, int_value_);
}
-TEST_F(AsyncInvokeTest, KillInvokerBeforeExecute) {
+TEST_F(AsyncInvokeTest, DISABLED_KillInvokerBeforeExecute) {
Thread thread;
thread.Start();
{
@@ -374,7 +451,7 @@ TEST_F(AsyncInvokeTest, KillInvokerBeforeExecute) {
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 @@ TEST_F(AsyncInvokeTest, Flush) {
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 dcf83e3d..64dae2f9 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 @@ uint64 TimeNanos() {
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 @@ static struct tm *gmtime_r(const time_t *timep, struct tm *result) {
*result = *tm;
return result;
}
-#endif // WEBRTC_WIN
+#endif // WEBRTC_WIN
void CurrentTmTime(struct tm *tm, int *microseconds) {
struct timeval timeval;
@@ -132,8 +136,8 @@ void CurrentTmTime(struct tm *tm, int *microseconds) {
}
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/urlencode.cc b/base/urlencode.cc
index b152829a..8dc185df 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 @@ static int HexPairValue(const char * code) {
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 @@ static int InternalUrlDecode(const char *source, char *dest,
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 253d2c5b..0a26cc9d 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 @@ class VirtualSocketServerTest : public testing::Test {
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 @@ TEST_F(VirtualSocketServerTest, close_v6) {
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 @@ TEST_F(VirtualSocketServerTest, TcpSendsPacketsInOrder_v6) {
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 @@ TEST_F(VirtualSocketServerTest, DISABLED_delay_v6) {
}
// 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 f8e8ddeb..90d19e4a 100644
--- a/base/virtualsocketserver.cc
+++ b/base/virtualsocketserver.cc
@@ -639,6 +639,10 @@ bool VirtualSocketServer::ProcessMessagesUntilIdle() {
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 87e35364..0ea51ab5 100644
--- a/base/virtualsocketserver.h
+++ b/base/virtualsocketserver.h
@@ -110,6 +110,9 @@ class VirtualSocketServer : public SocketServer, public sigslot::has_slots<> {
// 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 89a49ff4..cbe571ca 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/exp_filter.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' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=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/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-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-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' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=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/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-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_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 @@ gyp_all_modules: third_party_webrtc_base_webrtc_base_gyp
.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 9fbbdd25..cbe571ca 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/exp_filter.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' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=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/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-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-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' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=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/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-rtti \
- -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_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 @@ gyp_all_modules: third_party_webrtc_base_webrtc_base_gyp
.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 2fca1c41..cbe571ca 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/exp_filter.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' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=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/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-rtti \
- -fno-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-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' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=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/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-rtti \
- -fno-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_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 @@ gyp_all_modules: third_party_webrtc_base_webrtc_base_gyp
.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.mk b/base/webrtc_base.target.darwin-x86.mk
index a8d32439..cbe571ca 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/exp_filter.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' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=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/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-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-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' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=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/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-rtti \
- -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_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 @@ gyp_all_modules: third_party_webrtc_base_webrtc_base_gyp
.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 524e7630..cbe571ca 100644
--- a/base/webrtc_base.target.darwin-x86_64.mk
+++ b/base/webrtc_base.target.darwin-x86_64.mk
@@ -2,389 +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/exp_filter.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' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=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/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-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-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' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=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/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-rtti \
- -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_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
@@ -393,4 +28,15 @@ gyp_all_modules: third_party_webrtc_base_webrtc_base_gyp
.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 89a49ff4..cbe571ca 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/exp_filter.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' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=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/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-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-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' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=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/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-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_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 @@ gyp_all_modules: third_party_webrtc_base_webrtc_base_gyp
.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 9fbbdd25..cbe571ca 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/exp_filter.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' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=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/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-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-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' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=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/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-rtti \
- -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_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 @@ gyp_all_modules: third_party_webrtc_base_webrtc_base_gyp
.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 2fca1c41..cbe571ca 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/exp_filter.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' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=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/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-rtti \
- -fno-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-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' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=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/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-rtti \
- -fno-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_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 @@ gyp_all_modules: third_party_webrtc_base_webrtc_base_gyp
.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.mk b/base/webrtc_base.target.linux-x86.mk
index a8d32439..cbe571ca 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/exp_filter.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' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=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/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-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-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' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=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/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-rtti \
- -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_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 @@ gyp_all_modules: third_party_webrtc_base_webrtc_base_gyp
.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 524e7630..cbe571ca 100644
--- a/base/webrtc_base.target.linux-x86_64.mk
+++ b/base/webrtc_base.target.linux-x86_64.mk
@@ -2,389 +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/exp_filter.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' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=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/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-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-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' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DNO_TCMALLOC' \
- '-DDISABLE_NACL' \
- '-DCHROMIUM_BUILD' \
- '-DUSE_LIBJPEG_TURBO=1' \
- '-DENABLE_WEBRTC=1' \
- '-DUSE_PROPRIETARY_CODECS' \
- '-DENABLE_BROWSER_CDMS' \
- '-DENABLE_CONFIGURATION_POLICY' \
- '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
- '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
- '-DENABLE_EGLIMAGE=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/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-rtti \
- -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_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
@@ -393,4 +28,15 @@ gyp_all_modules: third_party_webrtc_base_webrtc_base_gyp
.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 d9610265..9f4381a6 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/build/OWNERS b/build/OWNERS
index 6f02741d..aa0f5b4d 100644
--- a/build/OWNERS
+++ b/build/OWNERS
@@ -1,6 +1,4 @@
-fischman@webrtc.org
kjellander@webrtc.org
-wu@webrtc.org
per-file tsan_suppressions.cc=*
diff --git a/build/apk_tests.gyp b/build/apk_tests.gyp
index 01859753..eed0799f 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 cbc398e4..fdf1abe1 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/',
@@ -112,6 +113,16 @@
'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 +132,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 +140,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 +181,9 @@
'<!@(pkg-config --cflags dbus-glib-1)',
],
}],
+ ['rtc_relative_path==1', {
+ 'defines': ['EXPAT_RELATIVE_PATH',],
+ }],
['enable_video==1', {
'defines': ['WEBRTC_MODULE_UTILITY_VIDEO',],
}],
diff --git a/build/merge_libs.gyp b/build/merge_libs.gyp
index 4f8cdac8..d6610029 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_voice.gyp b/build/merge_libs_voice.gyp
new file mode 100644
index 00000000..10e30590
--- /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/sanitizer_options.gyp b/build/sanitizer_options.gyp
deleted file mode 100644
index 32dcf361..00000000
--- a/build/sanitizer_options.gyp
+++ /dev/null
@@ -1,59 +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.
-
-# This is a similar target to the one in Chromium's base.gyp. It's needed to get
-# the same sanitizer settings as Chromium uses (i.e. ASan, LSan, TSan...).
-{
- 'targets': [
- {
- 'target_name': 'sanitizer_options',
- 'type': 'static_library',
- 'toolsets': ['host', 'target'],
- 'variables': {
- # Every target is going to depend on sanitizer_options, so allow
- # this one to depend on itself.
- 'prune_self_dependency': 1,
- # Do not let 'none' targets depend on this one, they don't need to.
- 'link_dependency': 1,
- },
- 'sources': [
- '<(DEPTH)/tools/sanitizer_options/sanitizer_options.cc',
- ],
- 'include_dirs': [
- '<(DEPTH)',
- ],
- # Some targets may want to opt-out from ASan, TSan and MSan and link
- # without the corresponding runtime libraries. We drop the libc++
- # dependency and omit the compiler flags to avoid bringing instrumented
- # code to those targets.
- 'conditions': [
- ['use_custom_libcxx==1', {
- 'dependencies!': [
- '<(DEPTH)/third_party/libc++/libc++.gyp:libcxx_proxy',
- ],
- }],
- ['tsan==1', {
- 'sources': [
- 'tsan_suppressions.cc',
- ],
- }],
- ],
- 'cflags!': [
- '-fsanitize=address',
- '-fsanitize=thread',
- '-fsanitize=memory',
- '-fsanitize-memory-track-origins',
- ],
- 'direct_dependent_settings': {
- 'ldflags': [
- '-Wl,-u_sanitizer_options_link_helper',
- ],
- },
- },
- ], # targets
-}
diff --git a/build/tsan_suppressions.cc b/build/tsan_suppressions_webrtc.cc
index b95f76a8..0ae74f1f 100644
--- a/build/tsan_suppressions.cc
+++ b/build/tsan_suppressions_webrtc.cc
@@ -23,6 +23,11 @@ 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"
@@ -38,12 +43,8 @@ char kTSanDefaultSuppressions[] =
// libjingle_p2p_unittest
// https://code.google.com/p/webrtc/issues/detail?id=2079
-"race:webrtc/base/messagequeue.cc\n"
"race:webrtc/base/testclient.cc\n"
"race:webrtc/base/virtualsocketserver.cc\n"
-"race:talk/base/messagequeue.cc\n"
-"race:talk/base/testclient.cc\n"
-"race:talk/base/virtualsocketserver.cc\n"
"race:talk/p2p/base/stunserver_unittest.cc\n"
// libjingle_unittest
@@ -51,11 +52,6 @@ char kTSanDefaultSuppressions[] =
"race:webrtc/base/logging.cc\n"
"race:webrtc/base/sharedexclusivelock_unittest.cc\n"
"race:webrtc/base/signalthread_unittest.cc\n"
-"race:webrtc/base/thread.cc\n"
-"race:talk/base/logging.cc\n"
-"race:talk/base/sharedexclusivelock_unittest.cc\n"
-"race:talk/base/signalthread_unittest.cc\n"
-"race:talk/base/thread.cc\n"
// third_party/usrsctp
// TODO(jiayl): https://code.google.com/p/webrtc/issues/detail?id=3492
@@ -65,7 +61,6 @@ char kTSanDefaultSuppressions[] =
// https://code.google.com/p/webrtc/issues/detail?id=3509
"deadlock:cricket::WebRtcVideoChannel2::WebRtcVideoSendStream::InputFrame\n"
"deadlock:cricket::WebRtcVideoChannel2::WebRtcVideoSendStream::SetCapturer\n"
-"deadlock:talk_base::AsyncResolver::~AsyncResolver\n"
"deadlock:webrtc::ProcessThreadImpl::RegisterModule\n"
"deadlock:webrtc::RTCPReceiver::SetSsrcs\n"
"deadlock:webrtc::RTPSenderAudio::RegisterAudioPayload\n"
@@ -77,10 +72,6 @@ char kTSanDefaultSuppressions[] =
"deadlock:webrtc::ViEEncoder::OnLocalSsrcChanged\n"
"deadlock:webrtc::ViESender::RegisterSendTransport\n"
-// libjingle_media_unittest triggers TSan heap-use-after-free in libvpx/.
-// https://code.google.com/p/webrtc/issues/detail?id=3671
-"race:vpx_codec_destroy\n"
-
// End of suppressions.
; // Please keep this semicolon.
diff --git a/build/webrtc.gni b/build/webrtc.gni
index fcbf04f7..878b6ff1 100644
--- a/build/webrtc.gni
+++ b/build/webrtc.gni
@@ -6,47 +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
-
- # Disable this to not build libvpx and instead use an externally provided lib.
- build_libvpx = true
+ rtc_enable_video = true
# Selects fixed-point code where possible.
- prefer_fixed_point = false
+ rtc_prefer_fixed_point = false
# Enable data logging. Produces text files with data logged within engines
# which can be easily parsed for offline processing.
- enable_data_logging = false
+ 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.
- build_json = true
- build_libjpeg = true
- build_libyuv = true
- build_libvpx = true
- build_ssl = true
+ 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
@@ -57,14 +59,52 @@ declare_args() {
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 86cf1c6a..bb1dca14 100644
--- a/call.h
+++ b/call.h
@@ -56,6 +56,10 @@ class OveruseCallback {
// etc.
class Call {
public:
+ enum NetworkState {
+ kNetworkUp,
+ kNetworkDown,
+ };
struct Config {
explicit Config(newapi::Transport* send_transport)
: webrtc_config(NULL),
@@ -88,8 +92,7 @@ class Call {
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;
@@ -111,6 +114,8 @@ class Call {
// 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
index 4dcc3226..036daa1f 100644
--- a/common_audio/BUILD.gn
+++ b/common_audio/BUILD.gn
@@ -9,18 +9,207 @@
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") {
- # TODO(andrew): Implement.
+ 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") {
- # TODO(andrew): Implement.
+ 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 (cpu_arch == "arm" && arm_version == 7) {
+if (rtc_build_armv7_neon) {
source_set("common_audio_neon") {
- # TODO(andrew): Implement.
+ 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/common_audio.gyp b/common_audio/common_audio.gyp
index 58b9bb98..e9abf822 100644
--- a/common_audio/common_audio.gyp
+++ b/common_audio/common_audio.gyp
@@ -184,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
}],
@@ -219,9 +228,7 @@
'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',
],
@@ -230,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 4c5676b8..a882dc7f 100644
--- a/common_audio/common_audio.target.darwin-arm.mk
+++ b/common_audio/common_audio.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -78,7 +77,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -92,13 +90,13 @@ MY_CFLAGS_Debug := \
-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 \
@@ -113,6 +111,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -136,12 +135,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -182,6 +184,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -199,7 +202,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -213,13 +215,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -257,12 +259,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -304,6 +309,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -322,50 +328,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 b6e77bb5..e43b96a3 100644
--- a/common_audio/common_audio.target.darwin-arm64.mk
+++ b/common_audio/common_audio.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -77,7 +76,6 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -103,6 +101,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -125,12 +124,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +170,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -183,7 +186,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -231,12 +233,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +280,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -292,42 +298,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 1dc88cd3..c4f2537c 100644
--- a/common_audio/common_audio.target.darwin-mips.mk
+++ b/common_audio/common_audio.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -82,7 +81,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -96,8 +94,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -112,6 +108,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -135,12 +132,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -180,6 +180,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -197,7 +198,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -211,8 +211,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -250,12 +248,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +297,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -314,46 +316,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/common_audio/common_audio.target.darwin-x86.mk
index 1cbe0793..457310bc 100644
--- a/common_audio/common_audio.target.darwin-x86.mk
+++ b/common_audio/common_audio.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -77,7 +76,6 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -108,6 +106,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -131,12 +130,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +176,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -189,7 +192,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -243,12 +245,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +292,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -304,46 +310,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 878774e6..08955b61 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 @@ include $(CLEAR_VARS)
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))
@@ -78,7 +77,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -107,6 +105,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -130,12 +129,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +175,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -189,7 +192,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -241,12 +243,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -285,6 +290,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -302,46 +308,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 4c5676b8..a882dc7f 100644
--- a/common_audio/common_audio.target.linux-arm.mk
+++ b/common_audio/common_audio.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -78,7 +77,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -92,13 +90,13 @@ MY_CFLAGS_Debug := \
-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 \
@@ -113,6 +111,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -136,12 +135,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -182,6 +184,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -199,7 +202,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -213,13 +215,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -257,12 +259,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -304,6 +309,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -322,50 +328,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 b6e77bb5..e43b96a3 100644
--- a/common_audio/common_audio.target.linux-arm64.mk
+++ b/common_audio/common_audio.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -77,7 +76,6 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -103,6 +101,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -125,12 +124,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +170,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -183,7 +186,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -231,12 +233,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +280,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -292,42 +298,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 1dc88cd3..c4f2537c 100644
--- a/common_audio/common_audio.target.linux-mips.mk
+++ b/common_audio/common_audio.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -82,7 +81,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -96,8 +94,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -112,6 +108,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -135,12 +132,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -180,6 +180,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -197,7 +198,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -211,8 +211,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -250,12 +248,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +297,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -314,46 +316,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/common_audio/common_audio.target.linux-x86.mk
index 1cbe0793..457310bc 100644
--- a/common_audio/common_audio.target.linux-x86.mk
+++ b/common_audio/common_audio.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -77,7 +76,6 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -108,6 +106,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -131,12 +130,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +176,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -189,7 +192,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -243,12 +245,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +292,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -304,46 +310,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 878774e6..08955b61 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 @@ include $(CLEAR_VARS)
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))
@@ -78,7 +77,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -107,6 +105,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -130,12 +129,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +175,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -189,7 +192,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -241,12 +243,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -285,6 +290,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -302,46 +308,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 24d6dc3b..d16d4132 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 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -53,13 +51,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -97,12 +96,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +142,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -157,7 +160,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,13 +175,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -217,12 +219,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -261,6 +266,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -279,50 +285,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 24d6dc3b..d16d4132 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 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -53,13 +51,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -97,12 +96,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +142,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -157,7 +160,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,13 +175,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -217,12 +219,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -261,6 +266,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -279,50 +285,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 f1529d19..cbb6f0bb 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 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -64,6 +62,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -87,12 +86,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +129,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -142,7 +145,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -197,12 +199,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +243,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -255,46 +261,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 b5eb8408..2dc2301e 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 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -63,6 +61,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -86,12 +85,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +128,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -142,7 +145,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -195,12 +197,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +241,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -253,46 +259,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 f1529d19..cbb6f0bb 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 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -64,6 +62,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -87,12 +86,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +129,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -142,7 +145,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -197,12 +199,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +243,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -255,46 +261,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 b5eb8408..2dc2301e 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 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -63,6 +61,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -86,12 +85,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +128,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -142,7 +145,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -195,12 +197,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +241,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -253,46 +259,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 a5411b88..a5160fdc 100644
--- a/common_audio/fir_filter.cc
+++ b/common_audio/fir_filter.cc
@@ -85,7 +85,7 @@ FIRFilterC::FIRFilterC(const float* coefficients, size_t coefficients_length)
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 7d873a73..6e7ae70e 100644
--- a/common_audio/fir_filter_sse.cc
+++ b/common_audio/fir_filter_sse.cc
@@ -31,14 +31,14 @@ FIRFilterSSE2::FIRFilterSSE2(const float* coefficients,
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 9972a0e0..0ce034be 100644
--- a/common_audio/include/audio_util.h
+++ b/common_audio/include/audio_util.h
@@ -62,7 +62,7 @@ void ScaleToFloat(const int16_t* src, size_t size, float* dest);
// 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 b1d630aa..00000000
--- 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 84f8125b..165cb356 100644
--- a/common_audio/resampler/sinc_resampler.cc
+++ b/common_audio/resampler/sinc_resampler.cc
@@ -222,23 +222,22 @@ void SincResampler::InitializeKernel() {
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 @@ void SincResampler::SetRatio(double io_sample_rate_ratio) {
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 @@ void SincResampler::Resample(int frames, float* destination) {
//
// 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 @@ void SincResampler::Resample(int frames, float* destination) {
#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 @@ float SincResampler::Convolve_C(const float* input_ptr, const float* k1,
}
// 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 bdbe7b1a..e00e0e5d 100644
--- a/common_audio/resampler/sinc_resampler_sse.cc
+++ b/common_audio/resampler/sinc_resampler_sse.cc
@@ -41,8 +41,10 @@ float SincResampler::Convolve_SSE(const float* input_ptr, const float* k1,
}
// 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 aed7e73b..00000000
--- 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 daffd936..f99dd62b 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 @@ void WebRtcSpl_AutoCorrToReflCoef(const int32_t *R, int use_order, int16_t *K)
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 0c2493bd..84d3bc42 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 @@ void WebRtcSpl_MemCpyReversedOrder(int16_t* dest, int16_t* source, int length)
}
}
-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 606902de..9b6049c2 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 33a41ba2..21c5663f 100644
--- a/common_audio/signal_processing/include/signal_processing_library.h
+++ b/common_audio/signal_processing/include/signal_processing_library.h
@@ -46,10 +46,6 @@
((uint32_t) ((uint32_t)(a) * (uint16_t)(b)))
#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
@@ -84,11 +80,7 @@
#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_ADD_SAT_W16(a, b) WebRtcSpl_AddSatW16(a, b)
// Shifting with negative numbers allowed
// Positive means left shift
@@ -112,8 +104,6 @@
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))
@@ -133,9 +123,9 @@ void WebRtcSpl_Init();
// 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.
@@ -148,18 +138,14 @@ void WebRtcSpl_MemSetW32(int32_t* vector,
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.
@@ -941,10 +927,10 @@ void WebRtcSpl_ResetResample8khzTo48khz(WebRtcSpl_State8khzTo48khz* state);
*
******************************************************************/
-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);
/************************************************************
@@ -1120,8 +1106,6 @@ void WebRtcSpl_SynthesisQMF(const int16_t* low_band,
// Output:
// - out_vector : Vector with the requested samples
//
-// Return value : Number of copied samples in |out_vector|
-//
//
// WebRtcSpl_ZerosArrayW16(...)
@@ -1136,24 +1120,6 @@ void WebRtcSpl_SynthesisQMF(const int16_t* low_band,
// 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 a4ddb3fa..d3cc6dee 100644
--- a/common_audio/signal_processing/include/spl_inl.h
+++ b/common_audio/signal_processing/include/spl_inl.h
@@ -35,6 +35,44 @@ static __inline int16_t WebRtcSpl_SatW32ToW16(int32_t value32) {
return out16;
}
+static __inline int32_t WebRtcSpl_AddSatW32(int32_t l_var1, int32_t l_var2) {
+ int32_t l_sum;
+
+ // Perform long addition
+ l_sum = l_var1 + l_var2;
+
+ if (l_var1 < 0) { // Check for underflow.
+ if ((l_var2 < 0) && (l_sum >= 0)) {
+ l_sum = (int32_t)0x80000000;
+ }
+ } else { // Check for overflow.
+ if ((l_var2 > 0) && (l_sum < 0)) {
+ l_sum = (int32_t)0x7FFFFFFF;
+ }
+ }
+
+ return l_sum;
+}
+
+static __inline int32_t WebRtcSpl_SubSatW32(int32_t l_var1, int32_t l_var2) {
+ int32_t l_diff;
+
+ // Perform subtraction.
+ l_diff = l_var1 - l_var2;
+
+ if (l_var1 < 0) { // Check for underflow.
+ if ((l_var2 > 0) && (l_diff > 0)) {
+ l_diff = (int32_t)0x80000000;
+ }
+ } else { // Check for overflow.
+ if ((l_var2 < 0) && (l_diff < 0)) {
+ l_diff = (int32_t)0x7FFFFFFF;
+ }
+ }
+
+ return l_diff;
+}
+
static __inline int16_t WebRtcSpl_AddSatW16(int16_t a, int16_t b) {
return WebRtcSpl_SatW32ToW16((int32_t) a + (int32_t) b);
}
@@ -46,7 +84,7 @@ static __inline int16_t WebRtcSpl_SubSatW16(int16_t var1, int16_t var2) {
#if !defined(MIPS32_LE)
static __inline int16_t WebRtcSpl_GetSizeInBits(uint32_t n) {
- int bits;
+ int16_t bits;
if (0xFFFF0000 & n) {
bits = 16;
@@ -62,8 +100,8 @@ static __inline int16_t WebRtcSpl_GetSizeInBits(uint32_t n) {
return bits;
}
-static __inline int WebRtcSpl_NormW32(int32_t a) {
- int zeros;
+static __inline int16_t WebRtcSpl_NormW32(int32_t a) {
+ int16_t zeros;
if (a == 0) {
return 0;
@@ -85,8 +123,8 @@ static __inline int WebRtcSpl_NormW32(int32_t a) {
return zeros;
}
-static __inline int WebRtcSpl_NormU32(uint32_t a) {
- int zeros;
+static __inline int16_t WebRtcSpl_NormU32(uint32_t a) {
+ int16_t zeros;
if (a == 0) return 0;
@@ -103,8 +141,8 @@ static __inline int WebRtcSpl_NormU32(uint32_t a) {
return zeros;
}
-static __inline int WebRtcSpl_NormW16(int16_t a) {
- int zeros;
+static __inline int16_t WebRtcSpl_NormW16(int16_t a) {
+ int16_t zeros;
if (a == 0) {
return 0;
@@ -132,46 +170,4 @@ static __inline int32_t WebRtc_MulAccumW16(int16_t a, int16_t b, int32_t c) {
#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;
-
- // Perform long addition
- l_sum = l_var1 + l_var2;
-
- if (l_var1 < 0) { // Check for underflow.
- if ((l_var2 < 0) && (l_sum >= 0)) {
- l_sum = (int32_t)0x80000000;
- }
- } else { // Check for overflow.
- if ((l_var2 > 0) && (l_sum < 0)) {
- l_sum = (int32_t)0x7FFFFFFF;
- }
- }
-
- return l_sum;
-}
-
-static __inline int32_t WebRtcSpl_SubSatW32(int32_t l_var1, int32_t l_var2) {
- int32_t l_diff;
-
- // Perform subtraction.
- l_diff = l_var1 - l_var2;
-
- if (l_var1 < 0) { // Check for underflow.
- if ((l_var2 > 0) && (l_diff > 0)) {
- l_diff = (int32_t)0x80000000;
- }
- } else { // Check for overflow.
- if ((l_var2 < 0) && (l_diff < 0)) {
- l_diff = (int32_t)0x7FFFFFFF;
- }
- }
-
- return l_diff;
-}
-#endif // #if !defined(MIPS_DSP_R1_LE)
-
#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 0f505471..0d10129a 100644
--- a/common_audio/signal_processing/include/spl_inl_armv7.h
+++ b/common_audio/signal_processing/include/spl_inl_armv7.h
@@ -51,10 +51,6 @@ static __inline int16_t WebRtcSpl_AddSatW16(int16_t a, int16_t b) {
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;
@@ -70,7 +66,6 @@ static __inline int32_t WebRtcSpl_SubSatW32(int32_t l_var1, int32_t l_var2) {
return l_sub;
}
-#endif
static __inline int16_t WebRtcSpl_SubSatW16(int16_t var1, int16_t var2) {
int32_t s_sub = 0;
@@ -88,7 +83,7 @@ static __inline int16_t WebRtcSpl_GetSizeInBits(uint32_t n) {
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) {
@@ -100,20 +95,20 @@ static __inline int WebRtcSpl_NormW32(int32_t a) {
__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) {
@@ -125,7 +120,7 @@ static __inline int WebRtcSpl_NormW16(int16_t a) {
__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 ab9a60d4..cd04bddc 100644
--- a/common_audio/signal_processing/include/spl_inl_mips.h
+++ b/common_audio/signal_processing/include/spl_inl_mips.h
@@ -137,10 +137,10 @@ static __inline int16_t WebRtcSpl_GetSizeInBits(uint32_t n) {
: [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(
@@ -160,10 +160,10 @@ static __inline int WebRtcSpl_NormW32(int32_t a) {
: [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(
@@ -172,10 +172,10 @@ static __inline int WebRtcSpl_NormU32(uint32_t a) {
: [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;
@@ -196,7 +196,7 @@ static __inline int WebRtcSpl_NormW16(int16_t a) {
: [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 eab091ba..9c0784ed 100644
--- a/common_audio/signal_processing/resample_by_2.c
+++ b/common_audio/signal_processing/resample_by_2.c
@@ -67,10 +67,10 @@ static const uint16_t kResampleAllpass2[3] = {12199, 37471, 60255};
// 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 @@ void WebRtcSpl_DownsampleBy2(const int16_t* in, int16_t len,
#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 8e840bb9..6ffce551 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 @@ static const uint16_t kResampleAllpass2[3] = {12199, 37471, 60255};
// 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 146afae5..3fa3d2ee 100644
--- a/common_audio/signal_processing/signal_processing_unittest.cc
+++ b/common_audio/signal_processing/signal_processing_unittest.cc
@@ -47,8 +47,6 @@ TEST_F(SplTest, MacroTest) {
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));
@@ -58,12 +56,8 @@ TEST_F(SplTest, MacroTest) {
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(16380, WEBRTC_SPL_ADD_SAT_W16(a, b));
// Shifting with negative numbers allowed
int shift_amount = 1; // Workaround compiler warning using variable here.
@@ -168,11 +162,9 @@ TEST_F(SplTest, MathOperationsTest) {
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];
@@ -180,35 +172,22 @@ TEST_F(SplTest, BasicArrayOperationsTest) {
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]);
@@ -217,7 +196,7 @@ TEST_F(SplTest, BasicArrayOperationsTest) {
// 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 966eef78..4f6430c2 100644
--- a/common_audio/signal_processing/splitting_filter.c
+++ b/common_audio/signal_processing/splitting_filter.c
@@ -45,7 +45,7 @@ static const uint16_t WebRtcSpl_kAllPassFilter2[3] = {21333, 49062, 63010};
// |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 @@ void WebRtcSpl_AllPassQMF(int32_t* in_data, int16_t data_length,
// 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.
diff --git a/common_audio/signal_processing/vector_scaling_operations.c b/common_audio/signal_processing/vector_scaling_operations.c
index d8392066..c3eaa289 100644
--- a/common_audio/signal_processing/vector_scaling_operations.c
+++ b/common_audio/signal_processing/vector_scaling_operations.c
@@ -75,7 +75,7 @@ void WebRtcSpl_VectorBitShiftW32ToW16(int16_t* out, int length,
(*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 ed5de6b9..00000000
--- 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_writer.cc b/common_audio/wav_writer.cc
index e5714735..30a220c2 100644
--- a/common_audio/wav_writer.cc
+++ b/common_audio/wav_writer.cc
@@ -29,17 +29,17 @@ WavFile::WavFile(const std::string& filename, int sample_rate, int num_channels)
num_channels_(num_channels),
num_samples_(0),
file_handle_(fopen(filename.c_str(), "wb")) {
- FATAL_ERROR_IF(!CheckWavParameters(num_channels_,
- sample_rate_,
- kWavFormat,
- kBytesPerSample,
- num_samples_));
- FATAL_ERROR_IF(!file_handle_);
+ 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};
- FATAL_ERROR_IF(fwrite(blank_header, kWavHeaderSize, 1, file_handle_) != 1);
+ CHECK_EQ(1u, fwrite(blank_header, kWavHeaderSize, 1, file_handle_));
}
WavFile::~WavFile() {
@@ -52,15 +52,15 @@ void WavFile::WriteSamples(const int16_t* samples, size_t num_samples) {
#endif
const size_t written =
fwrite(samples, sizeof(*samples), num_samples, file_handle_);
- FATAL_ERROR_IF(written != num_samples);
+ CHECK_EQ(num_samples, written);
num_samples_ += static_cast<uint32_t>(written);
- FATAL_ERROR_IF(written > std::numeric_limits<uint32_t>::max() ||
- num_samples_ < written); // detect uint32_t overflow
- FATAL_ERROR_IF(!CheckWavParameters(num_channels_,
- sample_rate_,
- kWavFormat,
- kBytesPerSample,
- num_samples_));
+ 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) {
@@ -74,12 +74,12 @@ void WavFile::WriteSamples(const float* samples, size_t num_samples) {
}
void WavFile::Close() {
- FATAL_ERROR_IF(fseek(file_handle_, 0, SEEK_SET) != 0);
+ CHECK_EQ(0, fseek(file_handle_, 0, SEEK_SET));
uint8_t header[kWavHeaderSize];
WriteWavHeader(header, num_channels_, sample_rate_, kWavFormat,
kBytesPerSample, num_samples_);
- FATAL_ERROR_IF(fwrite(header, kWavHeaderSize, 1, file_handle_) != 1);
- FATAL_ERROR_IF(fclose(file_handle_) != 0);
+ CHECK_EQ(1u, fwrite(header, kWavHeaderSize, 1, file_handle_));
+ CHECK_EQ(0, fclose(file_handle_));
file_handle_ = NULL;
}
@@ -101,3 +101,15 @@ void rtc_WavWriteSamples(rtc_WavFile* wf,
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
index a8fee51e..09667279 100644
--- a/common_audio/wav_writer.h
+++ b/common_audio/wav_writer.h
@@ -20,7 +20,7 @@
namespace webrtc {
// Simple C++ class for writing 16-bit PCM WAV files. All error handling is
-// by calls to FATAL_ERROR(), making it unsuitable for anything but debug code.
+// by calls to CHECK(), making it unsuitable for anything but debug code.
class WavFile {
public:
// Open a new WAV file for writing.
@@ -33,9 +33,13 @@ class WavFile {
// [-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 WriteSamples(const int16_t* samples, size_t num_samples);
void Close();
const int sample_rate_;
const int num_channels_;
@@ -57,6 +61,9 @@ 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"
diff --git a/common_audio/wav_writer_unittest.cc b/common_audio/wav_writer_unittest.cc
index 9efe96e3..9c593be6 100644
--- a/common_audio/wav_writer_unittest.cc
+++ b/common_audio/wav_writer_unittest.cc
@@ -25,10 +25,14 @@ 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 int kNumSamples = 3;
+ 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',
@@ -64,9 +68,14 @@ TEST(WavWriterTest, CPP) {
TEST(WavWriterTest, C) {
const std::string outfile = webrtc::test::OutputPath() + "wavtest2.wav";
rtc_WavFile *w = rtc_WavOpen(outfile.c_str(), 11904, 2);
- static const int kNumSamples = 4;
+ 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',
@@ -104,9 +113,9 @@ TEST(WavWriterTest, LargeFile) {
std::string outfile = webrtc::test::OutputPath() + "wavtest3.wav";
static const int kSampleRate = 8000;
static const int kNumChannels = 2;
- static const int kNumSamples = 3 * kSampleRate * kNumChannels;
+ static const uint32_t kNumSamples = 3 * kSampleRate * kNumChannels;
float samples[kNumSamples];
- for (int i = 0; i < kNumSamples; i += kNumChannels) {
+ 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);
@@ -117,7 +126,11 @@ TEST(WavWriterTest, LargeFile) {
}
{
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_video/BUILD.gn b/common_video/BUILD.gn
index 69915e34..1b9ad8c7 100644
--- a/common_video/BUILD.gn
+++ b/common_video/BUILD.gn
@@ -34,9 +34,15 @@ source_set("common_video") {
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 (build_libyuv) {
+ if (rtc_build_libyuv) {
deps += [ "//third_party/libyuv" ]
} else {
# Need to add a directory normally exported by libyuv.
diff --git a/common_video/OWNERS b/common_video/OWNERS
index ed9ac54d..c11f402d 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
diff --git a/common_video/common_video.target.darwin-arm.mk b/common_video/common_video.target.darwin-arm.mk
index 593d5514..2da28ffd 100644
--- a/common_video/common_video.target.darwin-arm.mk
+++ b/common_video/common_video.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -94,12 +93,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +145,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -160,7 +163,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -174,13 +176,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -218,12 +220,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +273,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -286,50 +292,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 b7ec2724..5dfaaea0 100644
--- a/common_video/common_video.target.darwin-arm64.mk
+++ b/common_video/common_video.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,6 +59,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -83,12 +82,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +131,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -144,7 +147,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -192,12 +194,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +244,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -256,42 +262,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 ef4f5868..684e131e 100644
--- a/common_video/common_video.target.darwin-mips.mk
+++ b/common_video/common_video.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,8 +48,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -66,6 +62,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +86,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +137,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -154,7 +155,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -168,8 +168,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -207,12 +205,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +257,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -274,46 +276,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/common_video/common_video.target.darwin-x86.mk
index 56c94d60..b4731559 100644
--- a/common_video/common_video.target.darwin-x86.mk
+++ b/common_video/common_video.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +137,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +153,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,12 +206,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +256,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -268,46 +274,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 ec7fac11..63fe854a 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 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -88,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +136,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +153,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,12 +204,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +254,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -266,46 +272,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 593d5514..2da28ffd 100644
--- a/common_video/common_video.target.linux-arm.mk
+++ b/common_video/common_video.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -94,12 +93,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +145,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -160,7 +163,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -174,13 +176,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -218,12 +220,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +273,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -286,50 +292,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 b7ec2724..5dfaaea0 100644
--- a/common_video/common_video.target.linux-arm64.mk
+++ b/common_video/common_video.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,6 +59,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -83,12 +82,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +131,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -144,7 +147,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -192,12 +194,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +244,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -256,42 +262,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 ef4f5868..684e131e 100644
--- a/common_video/common_video.target.linux-mips.mk
+++ b/common_video/common_video.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,8 +48,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -66,6 +62,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +86,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +137,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -154,7 +155,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -168,8 +168,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -207,12 +205,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +257,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -274,46 +276,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/common_video/common_video.target.linux-x86.mk
index 56c94d60..b4731559 100644
--- a/common_video/common_video.target.linux-x86.mk
+++ b/common_video/common_video.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +137,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +153,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,12 +206,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +256,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -268,46 +274,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 ec7fac11..63fe854a 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 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -88,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +136,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +153,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,12 +204,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +254,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -266,46 +272,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 91a11eda..0405ba0e 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 5f7a572b..ba23c87a 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 c8df436b..4cbf23f1 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 90f6250d..00000000
--- 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 e4bccf90..6f3fb1d6 100644
--- a/config.h
+++ b/config.h
@@ -108,6 +108,20 @@ struct VideoStream {
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_CONFIG_H_
diff --git a/examples/OWNERS b/examples/OWNERS
index 5c2e1682..c400f678 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 475705e2..38865f53 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 9fc4ca92..fd771717 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 @@ JOWW(void, NativeWebRtcContextRegistry_register)(
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_register)(
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/opensl_loopback/src/org/webrtc/app/OpenSlDemo.java b/examples/android/opensl_loopback/src/org/webrtc/app/OpenSlDemo.java
index 9cd2bf9c..046b415b 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 @@ public class OpenSlDemo extends Activity implements View.OnClickListener {
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 @@ public class OpenSlDemo extends Activity implements View.OnClickListener {
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/libjingle/xmllite/OWNERS b/libjingle/xmllite/OWNERS
new file mode 100644
index 00000000..1a24a6a8
--- /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 00000000..6abde321
--- /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 00000000..1e772d3d
--- /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 00000000..2a129b88
--- /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 00000000..fb144fb8
--- /dev/null
+++ b/libjingle/xmllite/rtc_xmllite.target.darwin-arm.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_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_NSS' \
+ '-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_NSS' \
+ '-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 00000000..20859a07
--- /dev/null
+++ b/libjingle/xmllite/rtc_xmllite.target.darwin-arm64.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_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_NSS' \
+ '-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_NSS' \
+ '-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 00000000..07ffdad4
--- /dev/null
+++ b/libjingle/xmllite/rtc_xmllite.target.darwin-mips.mk
@@ -0,0 +1,295 @@
+# 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 \
+ -mhard-float \
+ -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' \
+ '-DMIPS32_LE' \
+ '-DMIPS_FPU_LE' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_NSS' \
+ '-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 \
+ -mhard-float \
+ -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' \
+ '-DMIPS32_LE' \
+ '-DMIPS_FPU_LE' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_NSS' \
+ '-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 00000000..f0d70bde
--- /dev/null
+++ b/libjingle/xmllite/rtc_xmllite.target.darwin-x86.mk
@@ -0,0 +1,293 @@
+# 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_NSS' \
+ '-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_NSS' \
+ '-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 00000000..8aac97f8
--- /dev/null
+++ b/libjingle/xmllite/rtc_xmllite.target.darwin-x86_64.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 := \
+ -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_NSS' \
+ '-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_NSS' \
+ '-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 00000000..fb144fb8
--- /dev/null
+++ b/libjingle/xmllite/rtc_xmllite.target.linux-arm.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_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_NSS' \
+ '-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_NSS' \
+ '-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 00000000..20859a07
--- /dev/null
+++ b/libjingle/xmllite/rtc_xmllite.target.linux-arm64.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_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_NSS' \
+ '-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_NSS' \
+ '-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 00000000..07ffdad4
--- /dev/null
+++ b/libjingle/xmllite/rtc_xmllite.target.linux-mips.mk
@@ -0,0 +1,295 @@
+# 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 \
+ -mhard-float \
+ -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' \
+ '-DMIPS32_LE' \
+ '-DMIPS_FPU_LE' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_NSS' \
+ '-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 \
+ -mhard-float \
+ -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' \
+ '-DMIPS32_LE' \
+ '-DMIPS_FPU_LE' \
+ '-DWEBRTC_POSIX' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_ANDROID' \
+ '-DWEBRTC_ANDROID_OPENSLES' \
+ '-DFEATURE_ENABLE_SSL' \
+ '-DNO_MAIN_THREAD_WRAPPING' \
+ '-DSSL_USE_NSS' \
+ '-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 00000000..f0d70bde
--- /dev/null
+++ b/libjingle/xmllite/rtc_xmllite.target.linux-x86.mk
@@ -0,0 +1,293 @@
+# 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_NSS' \
+ '-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_NSS' \
+ '-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 00000000..8aac97f8
--- /dev/null
+++ b/libjingle/xmllite/rtc_xmllite.target.linux-x86_64.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 := \
+ -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_NSS' \
+ '-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_NSS' \
+ '-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 00000000..9d982c33
--- /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 00000000..354bf0b7
--- /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 00000000..8a5ce08d
--- /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=\"&gt;\"/>", builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestQuoting2) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder, "<testing a='&lt;>&amp;&quot;'/>");
+ EXPECT_EQ("<testing a=\"&lt;&gt;&amp;&quot;\"/>",
+ builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestQuoting3) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder, "<testing a='so &quot;important&quot;'/>");
+ EXPECT_EQ("<testing a=\"so &quot;important&quot;\"/>",
+ builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestQuoting4) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder, "<testing a='&quot;important&quot;, yes'/>");
+ EXPECT_EQ("<testing a=\"&quot;important&quot;, yes\"/>",
+ builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestQuoting5) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder,
+ "<testing a='&lt;what is &quot;important&quot;&gt;'/>");
+ EXPECT_EQ("<testing a=\"&lt;what is &quot;important&quot;&gt;\"/>",
+ builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestText1) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder, "<testing>></testing>");
+ EXPECT_EQ("<testing>&gt;</testing>", builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestText2) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder, "<testing>&lt;>&amp;&quot;</testing>");
+ EXPECT_EQ("<testing>&lt;&gt;&amp;\"</testing>",
+ builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestText3) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder, "<testing>so &lt;important&gt;</testing>");
+ EXPECT_EQ("<testing>so &lt;important&gt;</testing>",
+ builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestText4) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder, "<testing>&lt;important&gt;, yes</testing>");
+ EXPECT_EQ("<testing>&lt;important&gt;, yes</testing>",
+ builder.BuiltElement()->Str());
+}
+
+TEST(XmlBuilderTest, TestText5) {
+ XmlBuilder builder;
+ XmlParser::ParseXml(&builder,
+ "<testing>importance &amp;&lt;important&gt;&amp;</testing>");
+ EXPECT_EQ("<testing>importance &amp;&lt;important&gt;&amp;</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 00000000..0b9a9ff5
--- /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 00000000..0064ee9d
--- /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 00000000..2d90836e
--- /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 00000000..70c6f799
--- /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 00000000..df8faedb
--- /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 00000000..e1bef960
--- /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 00000000..b71a9b6b
--- /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 00000000..bac2fc69
--- /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 00000000..174f8aef
--- /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 00000000..a57a4b07
--- /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 00000000..bdb8be7d
--- /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 00000000..131c585e
--- /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 00000000..a73d81e6
--- /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 00000000..27d7cc0b
--- /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_ << "&lt;"; break;
+ case '>': *pout_ << "&gt;"; break;
+ case '&': *pout_ << "&amp;"; break;
+ case '"': *pout_ << "&quot;"; 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_ << "&lt;"; break;
+ case '>': *pout_ << "&gt;"; break;
+ case '&': *pout_ << "&amp;"; 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 00000000..40cf195f
--- /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 00000000..b4850b5a
--- /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 b6e36947..0554091a 100644
--- a/modules/CNG.target.darwin-arm.mk
+++ b/modules/CNG.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -94,12 +93,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +144,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -159,7 +162,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -177,13 +179,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -221,12 +223,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +275,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -288,50 +294,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 1f9f452f..a9734212 100644
--- a/modules/CNG.target.darwin-arm64.mk
+++ b/modules/CNG.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,6 +59,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -83,12 +82,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +130,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -143,7 +146,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -195,12 +197,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +246,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -258,42 +264,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 c9dcf285..ddc542ec 100644
--- a/modules/CNG.target.darwin-mips.mk
+++ b/modules/CNG.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -51,8 +49,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -67,6 +63,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +137,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -154,7 +155,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,8 +173,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -212,12 +210,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +261,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -278,46 +280,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/CNG.target.darwin-x86.mk
index 944d9206..fae50316 100644
--- a/modules/CNG.target.darwin-x86.mk
+++ b/modules/CNG.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +136,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -149,7 +152,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -207,12 +209,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +258,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -270,46 +276,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 088d9652..10fa41f0 100644
--- a/modules/CNG.target.darwin-x86_64.mk
+++ b/modules/CNG.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -88,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +135,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -149,7 +152,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -205,12 +207,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +256,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -268,46 +274,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 b6e36947..0554091a 100644
--- a/modules/CNG.target.linux-arm.mk
+++ b/modules/CNG.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -94,12 +93,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +144,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -159,7 +162,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -177,13 +179,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -221,12 +223,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +275,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -288,50 +294,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 1f9f452f..a9734212 100644
--- a/modules/CNG.target.linux-arm64.mk
+++ b/modules/CNG.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,6 +59,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -83,12 +82,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +130,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -143,7 +146,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -195,12 +197,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +246,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -258,42 +264,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 c9dcf285..ddc542ec 100644
--- a/modules/CNG.target.linux-mips.mk
+++ b/modules/CNG.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -51,8 +49,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -67,6 +63,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +137,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -154,7 +155,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,8 +173,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -212,12 +210,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +261,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -278,46 +280,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/CNG.target.linux-x86.mk
index 944d9206..fae50316 100644
--- a/modules/CNG.target.linux-x86.mk
+++ b/modules/CNG.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +136,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -149,7 +152,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -207,12 +209,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +258,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -270,46 +276,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 088d9652..10fa41f0 100644
--- a/modules/CNG.target.linux-x86_64.mk
+++ b/modules/CNG.target.linux-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -88,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +135,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -149,7 +152,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -205,12 +207,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +256,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -268,46 +274,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 299ac03a..c5dc8960 100644
--- a/modules/G711.target.darwin-arm.mk
+++ b/modules/G711.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -94,12 +93,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +141,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -156,7 +159,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -174,13 +176,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -218,12 +220,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +269,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -282,50 +288,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 71713f57..abaadeed 100644
--- a/modules/G711.target.darwin-arm64.mk
+++ b/modules/G711.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,6 +59,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -83,12 +82,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +127,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -140,7 +143,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -192,12 +194,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +240,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -252,42 +258,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 e6e88bf6..962dd280 100644
--- a/modules/G711.target.darwin-mips.mk
+++ b/modules/G711.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -51,8 +49,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -67,6 +63,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +134,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -151,7 +152,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -170,8 +170,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -209,12 +207,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +255,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -272,46 +274,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/G711.target.darwin-x86.mk
index 7ee51f5a..272c6e69 100644
--- a/modules/G711.target.darwin-x86.mk
+++ b/modules/G711.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +133,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -146,7 +149,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,12 +206,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +252,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -264,46 +270,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 e54d9dac..86f8458e 100644
--- a/modules/G711.target.darwin-x86_64.mk
+++ b/modules/G711.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -88,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +132,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -146,7 +149,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,12 +204,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +250,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -262,46 +268,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 299ac03a..c5dc8960 100644
--- a/modules/G711.target.linux-arm.mk
+++ b/modules/G711.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -94,12 +93,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +141,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -156,7 +159,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -174,13 +176,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -218,12 +220,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +269,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -282,50 +288,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 71713f57..abaadeed 100644
--- a/modules/G711.target.linux-arm64.mk
+++ b/modules/G711.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,6 +59,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -83,12 +82,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +127,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -140,7 +143,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -192,12 +194,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +240,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -252,42 +258,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 e6e88bf6..962dd280 100644
--- a/modules/G711.target.linux-mips.mk
+++ b/modules/G711.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -51,8 +49,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -67,6 +63,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +134,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -151,7 +152,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -170,8 +170,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -209,12 +207,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +255,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -272,46 +274,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/G711.target.linux-x86.mk
index 7ee51f5a..272c6e69 100644
--- a/modules/G711.target.linux-x86.mk
+++ b/modules/G711.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +133,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -146,7 +149,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,12 +206,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +252,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -264,46 +270,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 e54d9dac..86f8458e 100644
--- a/modules/G711.target.linux-x86_64.mk
+++ b/modules/G711.target.linux-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -88,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +132,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -146,7 +149,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,12 +204,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +250,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -262,46 +268,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 d69a8cbd..08a3ea57 100644
--- a/modules/G722.target.darwin-arm.mk
+++ b/modules/G722.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -51,13 +49,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -95,12 +94,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +142,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -157,7 +160,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -175,13 +177,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -219,12 +221,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +270,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -283,50 +289,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 dc58eb09..229ec728 100644
--- a/modules/G722.target.darwin-arm64.mk
+++ b/modules/G722.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -62,6 +60,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -84,12 +83,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +128,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -141,7 +144,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -193,12 +195,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +241,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -253,42 +259,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 e9dc7e58..5a32ccb7 100644
--- a/modules/G722.target.darwin-mips.mk
+++ b/modules/G722.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -52,8 +50,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -68,6 +64,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -91,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +135,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -152,7 +153,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -171,8 +171,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -210,12 +208,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +256,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -273,46 +275,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/G722.target.darwin-x86.mk
index 50d4f3d5..64325b74 100644
--- a/modules/G722.target.darwin-x86.mk
+++ b/modules/G722.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +134,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -147,7 +150,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -205,12 +207,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +253,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -265,46 +271,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 20a3f408..308dc135 100644
--- a/modules/G722.target.darwin-x86_64.mk
+++ b/modules/G722.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +133,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -147,7 +150,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -203,12 +205,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +251,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -263,46 +269,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 d69a8cbd..08a3ea57 100644
--- a/modules/G722.target.linux-arm.mk
+++ b/modules/G722.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -51,13 +49,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -95,12 +94,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +142,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -157,7 +160,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -175,13 +177,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -219,12 +221,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +270,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -283,50 +289,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 dc58eb09..229ec728 100644
--- a/modules/G722.target.linux-arm64.mk
+++ b/modules/G722.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -62,6 +60,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -84,12 +83,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +128,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -141,7 +144,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -193,12 +195,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +241,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -253,42 +259,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 e9dc7e58..5a32ccb7 100644
--- a/modules/G722.target.linux-mips.mk
+++ b/modules/G722.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -52,8 +50,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -68,6 +64,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -91,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +135,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -152,7 +153,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -171,8 +171,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -210,12 +208,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +256,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -273,46 +275,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/G722.target.linux-x86.mk
index 50d4f3d5..64325b74 100644
--- a/modules/G722.target.linux-x86.mk
+++ b/modules/G722.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +134,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -147,7 +150,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -205,12 +207,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +253,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -265,46 +271,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 20a3f408..308dc135 100644
--- a/modules/G722.target.linux-x86_64.mk
+++ b/modules/G722.target.linux-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +133,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -147,7 +150,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -203,12 +205,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +251,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -263,46 +269,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 ff4d859a..7cf8c9d0 100644
--- a/modules/PCM16B.target.darwin-arm.mk
+++ b/modules/PCM16B.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -49,13 +47,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -93,12 +92,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -138,6 +140,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -155,7 +158,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,13 +175,13 @@ MY_CFLAGS_Release := \
-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,12 +219,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +268,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -281,50 +287,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 310c69fa..62e75478 100644
--- a/modules/PCM16B.target.darwin-arm64.mk
+++ b/modules/PCM16B.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -60,6 +58,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -82,12 +81,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +126,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -139,7 +142,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -191,12 +193,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +239,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -251,42 +257,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 6c7626d0..d83a62fc 100644
--- a/modules/PCM16B.target.darwin-mips.mk
+++ b/modules/PCM16B.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,8 +48,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -66,6 +62,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +86,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +133,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +151,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -169,8 +169,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -208,12 +206,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +254,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -271,46 +273,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/PCM16B.target.darwin-x86.mk
index 893c6454..aa14d37a 100644
--- a/modules/PCM16B.target.darwin-x86.mk
+++ b/modules/PCM16B.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -88,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +132,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -203,12 +205,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +251,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -263,46 +269,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 a1fad754..311aa140 100644
--- a/modules/PCM16B.target.darwin-x86_64.mk
+++ b/modules/PCM16B.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -64,6 +62,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -87,12 +86,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +131,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -201,12 +203,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +249,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -261,46 +267,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 ff4d859a..7cf8c9d0 100644
--- a/modules/PCM16B.target.linux-arm.mk
+++ b/modules/PCM16B.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -49,13 +47,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -93,12 +92,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -138,6 +140,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -155,7 +158,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,13 +175,13 @@ MY_CFLAGS_Release := \
-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,12 +219,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +268,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -281,50 +287,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 310c69fa..62e75478 100644
--- a/modules/PCM16B.target.linux-arm64.mk
+++ b/modules/PCM16B.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -60,6 +58,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -82,12 +81,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +126,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -139,7 +142,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -191,12 +193,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +239,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -251,42 +257,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 6c7626d0..d83a62fc 100644
--- a/modules/PCM16B.target.linux-mips.mk
+++ b/modules/PCM16B.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,8 +48,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -66,6 +62,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +86,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +133,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +151,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -169,8 +169,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -208,12 +206,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +254,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -271,46 +273,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/PCM16B.target.linux-x86.mk
index 893c6454..aa14d37a 100644
--- a/modules/PCM16B.target.linux-x86.mk
+++ b/modules/PCM16B.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -88,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +132,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -203,12 +205,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +251,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -263,46 +269,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 a1fad754..311aa140 100644
--- a/modules/PCM16B.target.linux-x86_64.mk
+++ b/modules/PCM16B.target.linux-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -64,6 +62,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -87,12 +86,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +131,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -201,12 +203,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +249,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -261,46 +267,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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
index e4ad4cb3..8972ff9b 100644
--- a/modules/audio_coding/BUILD.gn
+++ b/modules/audio_coding/BUILD.gn
@@ -6,8 +6,678 @@
# 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") {
- # TODO(andrew): Implement.
+ 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/codecs/OWNERS b/modules/audio_coding/codecs/OWNERS
index e1e6256c..83880d21 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 32671ccd..00000000
--- 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 ab43aef8..bc08d431 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 de9e0d0a..a553a761 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 d363cb2b..0d1c6702 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 6030f8eb..d90a2691 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 779bb7c4..00000000
--- 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 ac9e44a6..a183757e 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 f34d2666..3b07d8ba 100644
--- a/modules/audio_coding/codecs/g711/g711.h
+++ b/modules/audio_coding/codecs/g711/g711.h
@@ -49,7 +49,7 @@ specification by other means.
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 087e3e11..134c1e4e 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 bee5ffad..83357e47 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 39dea9eb..00000000
--- 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 e62af981..65ca77ba 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 ef279ac5..da612245 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 5b07615a..03ac3c52 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 7075669f..a52981b9 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 0948a183..1d3d7990 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 d51301d5..9df14769 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 cbadcab2..00000000
--- 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 cdc8a9c5..ff6370e1 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/defines.h b/modules/audio_coding/codecs/ilbc/defines.h
index b60eaf48..796d7b58 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/interface/ilbc.h b/modules/audio_coding/codecs/ilbc/interface/ilbc.h
index 9ab2e86a..ccb3f5e3 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 e2e2ab52..b146ea3d 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 5ae4c874..92637593 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 da7163e9..942727ab 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 @@ extern "C" {
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 200a7ec4..00000000
--- 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_logist.c b/modules/audio_coding/codecs/isac/fix/source/arith_routines_logist.c
index e5741658..4efdecc9 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
@@ -282,11 +282,11 @@ int16_t WebRtcIsacfix_DecLogisticMulti2(int16_t *dataQ7,
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 724a900e..d28a6f70 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 @@ int32_t WebRtcIsacfix_UpdateUplinkBwImpl(BwEstimatorstr *bweStr,
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 @@ int32_t WebRtcIsacfix_UpdateUplinkBwImpl(BwEstimatorstr *bweStr,
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 @@ int32_t WebRtcIsacfix_UpdateUplinkBwImpl(BwEstimatorstr *bweStr,
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 @@ int32_t WebRtcIsacfix_UpdateUplinkBwImpl(BwEstimatorstr *bweStr,
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 @@ int32_t WebRtcIsacfix_UpdateUplinkBwImpl(BwEstimatorstr *bweStr,
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 @@ int32_t WebRtcIsacfix_UpdateUplinkBwImpl(BwEstimatorstr *bweStr,
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 @@ int32_t WebRtcIsacfix_UpdateUplinkBwImpl(BwEstimatorstr *bweStr,
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 @@ uint16_t WebRtcIsacfix_GetDownlinkBandwidth(const BwEstimatorstr *bweStr)
/* 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 @@ uint16_t WebRtcIsacfix_GetMinBytes(RateModel *State,
} 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 @@ uint16_t WebRtcIsacfix_GetMinBytes(RateModel *State,
//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 @@ uint16_t WebRtcIsacfix_GetMinBytes(RateModel *State,
/* 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 @@ uint16_t WebRtcIsacfix_GetMinBytes(RateModel *State,
/* 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 @@ void WebRtcIsacfix_UpdateRateModel(RateModel *State,
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/decode.c b/modules/audio_coding/codecs/isac/fix/source/decode.c
index ae0d687e..263f88a4 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 WebRtcIsacfix_DecodeImpl(int16_t *signal_out16,
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 @@ int16_t WebRtcIsacfix_DecodeImpl(int16_t *signal_out16,
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 @@ int16_t WebRtcIsacfix_DecodeImpl(int16_t *signal_out16,
/* ---- 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 @@ int16_t WebRtcIsacfix_DecodeImpl(int16_t *signal_out16,
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 c1221e7c..b1f5d10a 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 @@ int WebRtcIsacfix_EstimateBandwidth(BwEstimatorstr *bwest_str,
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 6bd5843c..fd301839 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 @@ static int16_t plc_filterma_Fast(
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 @@ int16_t WebRtcIsacfix_DecodePlcImpl(int16_t *signal_out16,
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 @@ int16_t WebRtcIsacfix_DecodePlcImpl(int16_t *signal_out16,
}
/* ------ 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 8b46d689..27d1c1fc 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 @@ static void CalcRootInvArSpec(const int16_t *ARCoefQ12,
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 @@ static void CalcRootInvArSpec(const int16_t *ARCoefQ12,
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 @@ static void CalcRootInvArSpec(const int16_t *ARCoefQ12,
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_mips.c b/modules/audio_coding/codecs/isac/fix/source/entropy_coding_mips.c
index a66a43ef..599f8f05 100644
--- a/modules/audio_coding/codecs/isac/fix/source/entropy_coding_mips.c
+++ b/modules/audio_coding/codecs/isac/fix/source/entropy_coding_mips.c
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "modules/audio_coding/codecs/isac/fix/source/entropy_coding.h"
-#include "modules/audio_coding/codecs/isac/fix/source/settings.h"
+#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
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 7a5f7462..2aa587fc 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" {
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 9a888e4f..c96fb05b 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 c8dcb166..8be427af 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 @@ void WebRtcIsacfix_AllpassFilter2FixDec16C(
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
}
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 125a5d1f..b4739215 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 @@ FOR_LOOP:
@ 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 @@ FOR_LOOP:
@ 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 @@ FOR_LOOP:
@ 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 @@ FOR_LOOP:
@ 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 @@ FOR_LOOP:
@ 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 d15318a7..3276331e 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"
diff --git a/modules/audio_coding/codecs/isac/fix/source/filters.c b/modules/audio_coding/codecs/isac/fix/source/filters.c
index eb0e87af..cf92a4d1 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 @@ static void AllpassFilterForDec32(int16_t *InOut16, //Q0
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 @@ void WebRtcIsacfix_DecimateAllpass32(const int16_t *in,
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 e070789e..4ea4dabc 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 3be2b151..118fd2fe 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;
@@ -355,10 +356,10 @@ int16_t WebRtcIsacfix_EncoderInit(ISACFIX_MainStruct *ISAC_main_inst,
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
@@ -382,16 +383,24 @@ int16_t WebRtcIsacfix_Encode(ISACFIX_MainStruct *ISAC_main_inst,
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 7010b1ee..7bef170d 100644
--- a/modules/audio_coding/codecs/isac/fix/source/isacfix.gypi
+++ b/modules/audio_coding/codecs/isac/fix/source/isacfix.gypi
@@ -140,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 d5b2d0e9..d7d198ca 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_unittest.cc b/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model_unittest.cc
index 08527158..aaeff2c5 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 587bcd47..7e8121e8 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 9fb72c6c..c38cbf62 100644
--- a/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c
+++ b/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c
@@ -66,7 +66,7 @@ static __inline void Intrp1DQ8(int32_t *x, int32_t *fx, int32_t *y, int32_t *fy)
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)
@@ -74,7 +74,8 @@ static __inline void Intrp1DQ8(int32_t *x, int32_t *fx, int32_t *y, int32_t *fy)
/* 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 */
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 d3c90b3f..5b1b3f17 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 c4e0be59..4aab2b6c 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 bb8b39ac..a5478b2e 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 115509af..55832063 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 bd20ba01..1777efde 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_unittest.cc b/modules/audio_coding/codecs/isac/fix/source/transform_unittest.cc
index 9a624e9b..855b5fea 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 35827511..207ee8c3 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
@@ -71,7 +71,7 @@ float IsacSpeedTest::EncodeABlock(int16_t* in_data, uint8_t* bit_stream,
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);
diff --git a/modules/audio_coding/codecs/isac/fix/test/kenny.cc b/modules/audio_coding/codecs/isac/fix/test/kenny.cc
index c3c6f135..91c4d76a 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 @@ int main(int argc, char* argv[])
/* 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 d5682b21..965f2bc1 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 @@ int main(int argc, char* argv[])
/* 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 @@ int main(int argc, char* argv[])
} 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 76a61e6d..40670580 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 @@ extern "C" {
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 07b2a314..00000000
--- 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 dba87493..19d1bf31 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 67e77b53..d59f7489 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 eab98c15..3dd2311b 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 33024a3d..76a9e753 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 d47eb80b..13170a08 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_EncoderInit(ISACStruct* ISAC_main_inst,
*/
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 WebRtcIsac_Encode(ISACStruct* ISAC_main_inst,
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 @@ int16_t WebRtcIsac_Encode(ISACStruct* ISAC_main_inst,
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 @@ int16_t WebRtcIsac_Encode(ISACStruct* ISAC_main_inst,
* 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 @@ int16_t WebRtcIsac_Encode(ISACStruct* ISAC_main_inst,
* 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 @@ int16_t WebRtcIsac_Encode(ISACStruct* ISAC_main_inst,
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;
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 3c55bd3d..1d653731 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 @@ class IsacTest : public ::testing::Test {
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 a46135a3..eabe7080 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 8ce004b2..5cc6c11c 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 121d05e7..c163f4ab 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 2c5698fb..599b89d8 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 cef885a7..256f1d4a 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 0f567ed7..6176d2cf 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 a4b3a59f..3e1bdf71 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 891c67cc..2b446e93 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 75525f69..090b94ca 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 e7518b16..8d708ce6 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 7c72571f..01989f01 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 c5f9561b..8af4e6f9 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
@@ -662,8 +662,8 @@ int main(int argc, char* argv[])
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 fd70eca7..72d3fe86 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 @@ int main(int argc, char* argv[])
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 980465d6..2df5a84e 100644
--- a/modules/audio_coding/codecs/isac/main/test/simpleKenny.c
+++ b/modules/audio_coding/codecs/isac/main/test/simpleKenny.c
@@ -373,8 +373,10 @@ valid values are 8 and 16.\n", sampFreqKHz);
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 3bc7d0e8..11c4ac2f 100644
--- a/modules/audio_coding/codecs/opus/interface/opus_interface.h
+++ b/modules/audio_coding/codecs/opus/interface/opus_interface.h
@@ -73,25 +73,29 @@ int16_t WebRtcOpus_SetBitRate(OpusEncInst* inst, int32_t rate);
int16_t WebRtcOpus_SetPacketLossRate(OpusEncInst* inst, int32_t loss_rate);
/****************************************************************************
- * WebRtcOpus_SetMaxBandwidth(...)
+ * WebRtcOpus_SetMaxPlaybackRate(...)
*
- * Configures the maximum bandwidth for encoding. This can be taken as a hint
- * about the maximum output bandwidth that the receiver is capable to render,
- * due to hardware limitations. Sending signals with higher audio bandwidth
- * results in higher than necessary network usage and encoding complexity.
+ * 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
- * - bandwidth : Maximum encoding bandwidth in Hz.
- * This parameter can take any value, but values
- * other than Opus typical bandwidths: 4000, 6000,
- * 8000, 12000, and 20000 will be rounded up (values
- * greater than 20000 will be rounded down) to
- * these values.
+ * - 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_SetMaxBandwidth(OpusEncInst* inst, int32_t bandwidth);
+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
diff --git a/modules/audio_coding/codecs/opus/opus_interface.c b/modules/audio_coding/codecs/opus/opus_interface.c
index 94ad1bd9..af581aaa 100644
--- a/modules/audio_coding/codecs/opus/opus_interface.c
+++ b/modules/audio_coding/codecs/opus/opus_interface.c
@@ -99,19 +99,19 @@ int16_t WebRtcOpus_SetPacketLossRate(OpusEncInst* inst, int32_t loss_rate) {
}
}
-int16_t WebRtcOpus_SetMaxBandwidth(OpusEncInst* inst, int32_t bandwidth) {
+int16_t WebRtcOpus_SetMaxPlaybackRate(OpusEncInst* inst, int32_t frequency_hz) {
opus_int32 set_bandwidth;
if (!inst)
return -1;
- if (bandwidth <= 4000) {
+ if (frequency_hz <= 8000) {
set_bandwidth = OPUS_BANDWIDTH_NARROWBAND;
- } else if (bandwidth <= 6000) {
+ } else if (frequency_hz <= 12000) {
set_bandwidth = OPUS_BANDWIDTH_MEDIUMBAND;
- } else if (bandwidth <= 8000) {
+ } else if (frequency_hz <= 16000) {
set_bandwidth = OPUS_BANDWIDTH_WIDEBAND;
- } else if (bandwidth <= 12000) {
+ } else if (frequency_hz <= 24000) {
set_bandwidth = OPUS_BANDWIDTH_SUPERWIDEBAND;
} else {
set_bandwidth = OPUS_BANDWIDTH_FULLBAND;
diff --git a/modules/audio_coding/codecs/opus/opus_unittest.cc b/modules/audio_coding/codecs/opus/opus_unittest.cc
index 582bb735..4a0d49fd 100644
--- a/modules/audio_coding/codecs/opus/opus_unittest.cc
+++ b/modules/audio_coding/codecs/opus/opus_unittest.cc
@@ -30,7 +30,7 @@ class OpusTest : public ::testing::Test {
OpusTest();
virtual void SetUp();
- void TestSetMaxBandwidth(opus_int32 expect, int32_t set);
+ void TestSetMaxPlaybackRate(opus_int32 expect, int32_t set);
WebRtcOpusEncInst* opus_mono_encoder_;
WebRtcOpusEncInst* opus_stereo_encoder_;
@@ -66,15 +66,15 @@ void OpusTest::SetUp() {
input_file = NULL;
}
-void OpusTest::TestSetMaxBandwidth(opus_int32 expect, int32_t set) {
+void OpusTest::TestSetMaxPlaybackRate(opus_int32 expect, int32_t set) {
opus_int32 bandwidth;
// Test mono encoder.
- EXPECT_EQ(0, WebRtcOpus_SetMaxBandwidth(opus_mono_encoder_, set));
+ 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_SetMaxBandwidth(opus_stereo_encoder_, set));
+ 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);
@@ -355,22 +355,25 @@ TEST_F(OpusTest, OpusSetPacketLossRate) {
EXPECT_EQ(0, WebRtcOpus_EncoderFree(opus_stereo_encoder_));
}
-TEST_F(OpusTest, OpusSetMaxBandwidth) {
+TEST_F(OpusTest, OpusSetMaxPlaybackRate) {
// Test without creating encoder memory.
- EXPECT_EQ(-1, WebRtcOpus_SetMaxBandwidth(opus_mono_encoder_, 20000));
- EXPECT_EQ(-1, WebRtcOpus_SetMaxBandwidth(opus_stereo_encoder_, 20000));
+ 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));
- TestSetMaxBandwidth(OPUS_BANDWIDTH_FULLBAND, 24000);
- TestSetMaxBandwidth(OPUS_BANDWIDTH_FULLBAND, 14000);
- TestSetMaxBandwidth(OPUS_BANDWIDTH_SUPERWIDEBAND, 10000);
- TestSetMaxBandwidth(OPUS_BANDWIDTH_WIDEBAND, 7000);
- TestSetMaxBandwidth(OPUS_BANDWIDTH_MEDIUMBAND, 6000);
- TestSetMaxBandwidth(OPUS_BANDWIDTH_NARROWBAND, 4000);
- TestSetMaxBandwidth(OPUS_BANDWIDTH_NARROWBAND, 3000);
+ 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_));
diff --git a/modules/audio_coding/codecs/pcm16b/Android.mk b/modules/audio_coding/codecs/pcm16b/Android.mk
deleted file mode 100644
index 2e88fa60..00000000
--- 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 505142e7..9c96b830 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,17 +26,17 @@ extern "C" {
* "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(const int16_t* speechIn16b,
- int16_t len,
+ int16_t length_samples,
int16_t* speechOut16b);
/****************************************************************************
@@ -64,18 +64,18 @@ int16_t WebRtcPcm16b_Encode(int16_t *speech16b,
* "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 7661dc13..af6720f6 100644
--- a/modules/audio_coding/codecs/pcm16b/pcm16b.c
+++ b/modules/audio_coding/codecs/pcm16b/pcm16b.c
@@ -12,13 +12,12 @@
#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
@@ -26,18 +25,18 @@
/* Encoder with int16_t Output */
int16_t WebRtcPcm16b_EncodeW16(const int16_t* speechIn16b,
- int16_t len,
+ 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 @@ int16_t WebRtcPcm16b_Encode(int16_t *speech16b,
/* 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 @@ int16_t WebRtcPcm16b_DecodeW16(void *inst,
// 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 4d675e10..6503a51e 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 64e323c0..6c958a54 100644
--- a/modules/audio_coding/main/acm2/acm_amr.cc
+++ b/modules/audio_coding/main/acm2/acm_amr.cc
@@ -77,8 +77,6 @@ void ACMAMR::DestructEncoderSafe() { return; }
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 @@ int16_t ACMAMR::SetBitRateSafe(const int32_t rate) {
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 efa56874..ab223005 100644
--- a/modules/audio_coding/main/acm2/acm_amr.h
+++ b/modules/audio_coding/main/acm2/acm_amr.h
@@ -48,8 +48,6 @@ class ACMAMR : public ACMGenericCodec {
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 4dd4e97b..5c9540fd 100644
--- a/modules/audio_coding/main/acm2/acm_amrwb.cc
+++ b/modules/audio_coding/main/acm2/acm_amrwb.cc
@@ -73,8 +73,6 @@ void ACMAMRwb::DestructEncoderSafe() { return; }
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 @@ int16_t ACMAMRwb::SetBitRateSafe(const int32_t rate) {
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 c8db6593..5b90e0be 100644
--- a/modules/audio_coding/main/acm2/acm_amrwb.h
+++ b/modules/audio_coding/main/acm2/acm_amrwb.h
@@ -48,8 +48,6 @@ class ACMAMRwb : public ACMGenericCodec {
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 3cd6e84d..70cd0a86 100644
--- a/modules/audio_coding/main/acm2/acm_celt.cc
+++ b/modules/audio_coding/main/acm2/acm_celt.cc
@@ -57,10 +57,6 @@ void ACMCELT::DestructEncoderSafe() {
return;
}
-void ACMCELT::InternalDestructEncoderInst(void* /* ptr_inst */) {
- return;
-}
-
int16_t ACMCELT::SetBitRateSafe(const int32_t /*rate*/) {
return -1;
}
@@ -159,13 +155,6 @@ void ACMCELT::DestructEncoderSafe() {
}
}
-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 dc8d3ee0..b7325dae 100644
--- a/modules/audio_coding/main/acm2/acm_celt.h
+++ b/modules/audio_coding/main/acm2/acm_celt.h
@@ -37,8 +37,6 @@ class ACMCELT : public ACMGenericCodec {
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 7f0adf81..8fef66ea 100644
--- a/modules/audio_coding/main/acm2/acm_cng.cc
+++ b/modules/audio_coding/main/acm2/acm_cng.cc
@@ -71,13 +71,6 @@ void ACMCNG::DestructEncoderSafe() {
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 8b0a3928..d3a8bd3d 100644
--- a/modules/audio_coding/main/acm2/acm_cng.h
+++ b/modules/audio_coding/main/acm2/acm_cng.h
@@ -40,8 +40,6 @@ class ACMCNG: public ACMGenericCodec {
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 07bab652..c9f4dedf 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 @@ ACMGenericCodec* ACMDTMFPlayout::CreateInstance(void) { return NULL; }
int16_t ACMDTMFPlayout::InternalCreateEncoder() { return -1; }
-void ACMDTMFPlayout::InternalDestructEncoderInst(void* /* ptr_inst */) {
- return;
-}
-
void ACMDTMFPlayout::DestructEncoderSafe() {
return;
}
@@ -73,11 +69,6 @@ int16_t ACMDTMFPlayout::InternalCreateEncoder() {
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 5adb0ddc..dd87df4e 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 @@ class ACMDTMFPlayout : public ACMGenericCodec {
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 8d457723..e0a756dd 100644
--- a/modules/audio_coding/main/acm2/acm_g722.cc
+++ b/modules/audio_coding/main/acm2/acm_g722.cc
@@ -52,8 +52,6 @@ int16_t ACMG722::InternalCreateEncoder() { return -1; }
void ACMG722::DestructEncoderSafe() { return; }
-void ACMG722::InternalDestructEncoderInst(void* /* ptr_inst */) { return; }
-
#else //===================== Actual Implementation =======================
// Encoder and decoder memory
@@ -187,13 +185,6 @@ void ACMG722::DestructEncoderSafe() {
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 6cdd79d4..dd3b7669 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;
@@ -51,8 +51,6 @@ class ACMG722 : public ACMGenericCodec {
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 3609f072..5739dd3d 100644
--- a/modules/audio_coding/main/acm2/acm_g7221.cc
+++ b/modules/audio_coding/main/acm2/acm_g7221.cc
@@ -115,8 +115,6 @@ int16_t ACMG722_1::InternalCreateEncoder() { return -1; }
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 @@ void ACMG722_1::DestructEncoderSafe() {
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 74d9b270..3935798b 100644
--- a/modules/audio_coding/main/acm2/acm_g7221.h
+++ b/modules/audio_coding/main/acm2/acm_g7221.h
@@ -43,8 +43,6 @@ class ACMG722_1 : public ACMGenericCodec {
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 f6555f5d..996eaf8c 100644
--- a/modules/audio_coding/main/acm2/acm_g7221c.cc
+++ b/modules/audio_coding/main/acm2/acm_g7221c.cc
@@ -115,8 +115,6 @@ int16_t ACMG722_1C::InternalCreateEncoder() { return -1; }
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 @@ void ACMG722_1C::DestructEncoderSafe() {
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 66b0f54a..52a0db9f 100644
--- a/modules/audio_coding/main/acm2/acm_g7221c.h
+++ b/modules/audio_coding/main/acm2/acm_g7221c.h
@@ -43,8 +43,6 @@ class ACMG722_1C : public ACMGenericCodec {
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 6f95f368..de1af6e5 100644
--- a/modules/audio_coding/main/acm2/acm_g729.cc
+++ b/modules/audio_coding/main/acm2/acm_g729.cc
@@ -57,8 +57,6 @@ int16_t ACMG729::InternalCreateEncoder() { return -1; }
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::DestructEncoderSafe() {
}
}
-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 88b1bf7c..be48c6e0 100644
--- a/modules/audio_coding/main/acm2/acm_g729.h
+++ b/modules/audio_coding/main/acm2/acm_g729.h
@@ -38,8 +38,6 @@ class ACMG729 : public ACMGenericCodec {
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 3cf9f22f..e50d027d 100644
--- a/modules/audio_coding/main/acm2/acm_g7291.cc
+++ b/modules/audio_coding/main/acm2/acm_g7291.cc
@@ -51,8 +51,6 @@ int16_t ACMG729_1::InternalCreateEncoder() { return -1; }
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::DestructEncoderSafe() {
}
}
-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 38c8fe17..8387dcfe 100644
--- a/modules/audio_coding/main/acm2/acm_g7291.h
+++ b/modules/audio_coding/main/acm2/acm_g7291.h
@@ -38,8 +38,6 @@ class ACMG729_1 : public ACMGenericCodec {
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 565d291f..29dccd2f 100644
--- a/modules/audio_coding/main/acm2/acm_generic_codec.cc
+++ b/modules/audio_coding/main/acm2/acm_generic_codec.cc
@@ -622,13 +622,6 @@ int16_t ACMGenericCodec::CreateEncoder() {
return status;
}
-void ACMGenericCodec::DestructEncoderInst(void* ptr_inst) {
- if (ptr_inst != NULL) {
- WriteLockScoped lockCodec(codec_wrapper_lock_);
- InternalDestructEncoderInst(ptr_inst);
- }
-}
-
uint32_t ACMGenericCodec::EarliestTimestamp() const {
ReadLockScoped cs(codec_wrapper_lock_);
return in_timestamp_[0];
@@ -1000,9 +993,9 @@ int16_t ACMGenericCodec::REDPayloadISAC(const int32_t /* isac_rate */,
return -1;
}
-int ACMGenericCodec::SetOpusMaxBandwidth(int /* max_bandwidth */) {
+int ACMGenericCodec::SetOpusMaxPlaybackRate(int /* frequency_hz */) {
WEBRTC_TRACE(webrtc::kTraceWarning, webrtc::kTraceAudioCoding, unique_id_,
- "The send-codec is not Opus, failed to set maximum bandwidth.");
+ "The send-codec is not Opus, failed to set maximum playback rate.");
return -1;
}
diff --git a/modules/audio_coding/main/acm2/acm_generic_codec.h b/modules/audio_coding/main/acm2/acm_generic_codec.h
index b88e28f0..ad6f412a 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 @@ class ACMGenericCodec {
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.
@@ -538,21 +526,20 @@ class ACMGenericCodec {
int16_t* payload_len_bytes);
///////////////////////////////////////////////////////////////////////////
- // int SetOpusMaxBandwidth()
- // Sets maximum required encoding bandwidth for Opus. This is to tell Opus
- // that it is enough to code the input audio up to a bandwidth. A use case of
- // this is when the receiver cannot render the full band. Opus can take this
- // information to optimize the bit rate and increase the computation
- // efficiency.
+ // 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:
- // -max_bandwidth : maximum required bandwidth.
+ // -frequency_hz : maximum playback rate in Hz.
//
// Return value:
// -1 if failed or on codecs other than Opus
// 0 if succeeded.
//
- virtual int SetOpusMaxBandwidth(int /* max_bandwidth */);
+ virtual int SetOpusMaxPlaybackRate(int /* frequency_hz */);
///////////////////////////////////////////////////////////////////////////
// HasFrameToEncode()
@@ -838,23 +825,6 @@ class ACMGenericCodec {
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
diff --git a/modules/audio_coding/main/acm2/acm_gsmfr.cc b/modules/audio_coding/main/acm2/acm_gsmfr.cc
index 90f9fce7..1c37a1ee 100644
--- a/modules/audio_coding/main/acm2/acm_gsmfr.cc
+++ b/modules/audio_coding/main/acm2/acm_gsmfr.cc
@@ -49,10 +49,6 @@ int16_t ACMGSMFR::InternalCreateEncoder() { return -1; }
void ACMGSMFR::DestructEncoderSafe() { return; }
-void ACMGSMFR::InternalDestructEncoderInst(void* /* ptr_inst */) {
- return;
-}
-
#else //===================== Actual Implementation =======================
ACMGSMFR::ACMGSMFR(int16_t codec_id)
@@ -147,13 +143,6 @@ void ACMGSMFR::DestructEncoderSafe() {
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 79c3a180..2cf954b5 100644
--- a/modules/audio_coding/main/acm2/acm_gsmfr.h
+++ b/modules/audio_coding/main/acm2/acm_gsmfr.h
@@ -38,8 +38,6 @@ class ACMGSMFR : public ACMGenericCodec {
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 eaa079c4..d23ec6ed 100644
--- a/modules/audio_coding/main/acm2/acm_ilbc.cc
+++ b/modules/audio_coding/main/acm2/acm_ilbc.cc
@@ -40,8 +40,6 @@ int16_t ACMILBC::InternalCreateEncoder() { return -1; }
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::DestructEncoderSafe() {
}
}
-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 714c9004..3cf2c73a 100644
--- a/modules/audio_coding/main/acm2/acm_ilbc.h
+++ b/modules/audio_coding/main/acm2/acm_ilbc.h
@@ -44,8 +44,6 @@ class ACMILBC : public ACMGenericCodec {
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 2adae861..f3682f1e 100644
--- a/modules/audio_coding/main/acm2/acm_isac.cc
+++ b/modules/audio_coding/main/acm2/acm_isac.cc
@@ -93,8 +93,6 @@ int16_t ACMISAC::InternalCreateEncoder() { return -1; }
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 @@ int16_t ACMISAC::InternalEncode(uint8_t* bitstream,
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 @@ void ACMISAC::DestructEncoderSafe() {
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) {
@@ -736,7 +728,7 @@ int ACMISAC::Decode(const uint8_t* encoded,
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),
diff --git a/modules/audio_coding/main/acm2/acm_isac.h b/modules/audio_coding/main/acm2/acm_isac.h
index 31263c70..486313a0 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 {
@@ -117,8 +117,6 @@ class ACMISAC : public ACMGenericCodec, AudioDecoder {
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 e0054345..8991dae8 100644
--- a/modules/audio_coding/main/acm2/acm_opus.cc
+++ b/modules/audio_coding/main/acm2/acm_opus.cc
@@ -28,7 +28,6 @@ ACMOpus::ACMOpus(int16_t /* codec_id */)
sample_freq_(0),
bitrate_(0),
channels_(1),
- fec_enabled_(false),
packet_loss_rate_(0) {
return;
}
@@ -58,10 +57,6 @@ void ACMOpus::DestructEncoderSafe() {
return;
}
-void ACMOpus::InternalDestructEncoderInst(void* /* ptr_inst */) {
- return;
-}
-
int16_t ACMOpus::SetBitRateSafe(const int32_t /*rate*/) {
return -1;
}
@@ -73,7 +68,6 @@ ACMOpus::ACMOpus(int16_t codec_id)
sample_freq_(32000), // Default sampling frequency.
bitrate_(20000), // Default bit-rate.
channels_(1), // Default mono.
- fec_enabled_(false), // Default FEC is off.
packet_loss_rate_(0) { // Initial packet loss rate.
codec_id_ = codec_id;
// Opus has internal DTX, but we dont use it for now.
@@ -179,13 +173,6 @@ void ACMOpus::DestructEncoderSafe() {
}
}
-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_,
@@ -207,15 +194,11 @@ int16_t ACMOpus::SetBitRateSafe(const int32_t rate) {
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;
}
@@ -263,9 +246,9 @@ int ACMOpus::SetPacketLossRate(int loss_rate) {
return -1;
}
-int ACMOpus::SetOpusMaxBandwidth(int max_bandwidth) {
- // Ask the encoder to change the maximum required bandwidth.
- return WebRtcOpus_SetMaxBandwidth(encoder_inst_ptr_, max_bandwidth);
+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
diff --git a/modules/audio_coding/main/acm2/acm_opus.h b/modules/audio_coding/main/acm2/acm_opus.h
index 8c2882c0..8ef64067 100644
--- a/modules/audio_coding/main/acm2/acm_opus.h
+++ b/modules/audio_coding/main/acm2/acm_opus.h
@@ -38,15 +38,13 @@ class ACMOpus : public ACMGenericCodec {
virtual int SetPacketLossRate(int loss_rate) OVERRIDE;
- virtual int SetOpusMaxBandwidth(int max_bandwidth) 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) OVERRIDE
EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
@@ -55,7 +53,6 @@ class ACMOpus : public ACMGenericCodec {
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
index 45ddd012..e33c9d38 100644
--- a/modules/audio_coding/main/acm2/acm_opus_unittest.cc
+++ b/modules/audio_coding/main/acm2/acm_opus_unittest.cc
@@ -10,7 +10,7 @@
#include "webrtc/modules/audio_coding/main/acm2/acm_opus.h"
-#include "gtest/gtest.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_coding/main/acm2/acm_codec_database.h"
namespace webrtc {
diff --git a/modules/audio_coding/main/acm2/acm_pcm16b.cc b/modules/audio_coding/main/acm2/acm_pcm16b.cc
index 89688a87..54c78602 100644
--- a/modules/audio_coding/main/acm2/acm_pcm16b.cc
+++ b/modules/audio_coding/main/acm2/acm_pcm16b.cc
@@ -41,8 +41,6 @@ ACMGenericCodec* ACMPCM16B::CreateInstance(void) { return NULL; }
int16_t ACMPCM16B::InternalCreateEncoder() { return -1; }
-void ACMPCM16B::InternalDestructEncoderInst(void* /* ptr_inst */) { return; }
-
void ACMPCM16B::DestructEncoderSafe() { return; }
#else //===================== Actual Implementation =======================
@@ -77,11 +75,6 @@ int16_t ACMPCM16B::InternalCreateEncoder() {
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 de4330d5..0811a171 100644
--- a/modules/audio_coding/main/acm2/acm_pcm16b.h
+++ b/modules/audio_coding/main/acm2/acm_pcm16b.h
@@ -37,8 +37,6 @@ class ACMPCM16B : public ACMGenericCodec {
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 1dd6e48f..548e8fda 100644
--- a/modules/audio_coding/main/acm2/acm_pcma.cc
+++ b/modules/audio_coding/main/acm2/acm_pcma.cc
@@ -47,11 +47,6 @@ int16_t ACMPCMA::InternalCreateEncoder() {
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 a2d8874a..d7d00b4a 100644
--- a/modules/audio_coding/main/acm2/acm_pcma.h
+++ b/modules/audio_coding/main/acm2/acm_pcma.h
@@ -35,8 +35,6 @@ class ACMPCMA : public ACMGenericCodec {
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 7d2536fc..5c032363 100644
--- a/modules/audio_coding/main/acm2/acm_pcmu.cc
+++ b/modules/audio_coding/main/acm2/acm_pcmu.cc
@@ -48,10 +48,6 @@ int16_t ACMPCMU::InternalCreateEncoder() {
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 7aa83b75..dccfffd5 100644
--- a/modules/audio_coding/main/acm2/acm_pcmu.h
+++ b/modules/audio_coding/main/acm2/acm_pcmu.h
@@ -36,8 +36,6 @@ class ACMPCMU : public ACMGenericCodec {
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
index 43d623d1..7e41328e 100644
--- a/modules/audio_coding/main/acm2/acm_receive_test.cc
+++ b/modules/audio_coding/main/acm2/acm_receive_test.cc
@@ -22,127 +22,67 @@
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.
-
- if (STR_CASE_CMP(codec_param->plname, "opus") == 0)
- codec_param->channels = 1; // Always register Opus as mono.
- else if (codec_param->channels > 1)
- return false; // Skip all non-mono codecs.
-
- 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
-
AcmReceiveTest::AcmReceiveTest(PacketSource* packet_source,
AudioSink* audio_sink,
- int output_freq_hz)
+ 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) {
+ 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() {
- 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";
- }
- }
+ 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() {
- 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";
- }
- }
+ 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() {
@@ -151,11 +91,19 @@ void AcmReceiveTest::Run() {
// 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_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_);
- EXPECT_EQ(1, output_frame.num_channels_);
+ 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);
}
@@ -165,11 +113,10 @@ void AcmReceiveTest::Run() {
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))
+ 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
diff --git a/modules/audio_coding/main/acm2/acm_receive_test.h b/modules/audio_coding/main/acm2/acm_receive_test.h
index 672c9292..19fe4c53 100644
--- a/modules/audio_coding/main/acm2/acm_receive_test.h
+++ b/modules/audio_coding/main/acm2/acm_receive_test.h
@@ -16,7 +16,7 @@
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
namespace webrtc {
-class AudioCodingModule;
+class AudioCoding;
struct CodecInst;
namespace test {
@@ -25,9 +25,17 @@ class PacketSource;
class AcmReceiveTest {
public:
- AcmReceiveTest(PacketSource* packet_source,
- AudioSink* audio_sink,
- int output_freq_hz);
+ 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.
@@ -42,10 +50,11 @@ class AcmReceiveTest {
private:
SimulatedClock clock_;
- scoped_ptr<AudioCodingModule> acm_;
+ scoped_ptr<AudioCoding> acm_;
PacketSource* packet_source_;
AudioSink* audio_sink_;
const int output_freq_hz_;
+ NumOutputChannels exptected_output_channels_;
DISALLOW_COPY_AND_ASSIGN(AcmReceiveTest);
};
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 00000000..b0c9af13
--- /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 00000000..795893c2
--- /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.h b/modules/audio_coding/main/acm2/acm_receiver.h
index 180b4ba6..94ea5b01 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,7 +24,6 @@
#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 {
diff --git a/modules/audio_coding/main/acm2/acm_receiver_unittest.cc b/modules/audio_coding/main/acm2/acm_receiver_unittest.cc
index 81c97e5e..9cfef3a8 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 @@ class AcmReceiverTest : public AudioPacketizationCallback,
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 @@ class AcmReceiverTest : public AudioPacketizationCallback,
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(&current_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 @@ class AcmReceiverTest : public AudioPacketizationCallback,
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 @@ class AcmReceiverTest : public AudioPacketizationCallback,
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 @@ class AcmReceiverTest : public AudioPacketizationCallback,
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.
@@ -307,7 +303,7 @@ TEST_F(AcmReceiverTest, DISABLED_ON_ANDROID(LastAudioCodec)) {
// 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;
}
@@ -316,7 +312,7 @@ TEST_F(AcmReceiverTest, DISABLED_ON_ANDROID(LastAudioCodec)) {
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_);
@@ -330,7 +326,7 @@ TEST_F(AcmReceiverTest, DISABLED_ON_ANDROID(LastAudioCodec)) {
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]);
@@ -342,7 +338,7 @@ TEST_F(AcmReceiverTest, DISABLED_ON_ANDROID(LastAudioCodec)) {
// 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 00000000..ef890ecb
--- /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(&current_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 4f2c70cf..05996e51 100644
--- a/modules/audio_coding/main/acm2/acm_red.cc
+++ b/modules/audio_coding/main/acm2/acm_red.cc
@@ -41,10 +41,6 @@ int16_t ACMRED::InternalCreateEncoder() {
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 ac381709..73f904ae 100644
--- a/modules/audio_coding/main/acm2/acm_red.h
+++ b/modules/audio_coding/main/acm2/acm_red.h
@@ -33,8 +33,6 @@ class ACMRED : public ACMGenericCodec {
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
index 67cc9b2b..ec3c2540 100644
--- a/modules/audio_coding/main/acm2/acm_send_test.cc
+++ b/modules/audio_coding/main/acm2/acm_send_test.cc
@@ -27,7 +27,6 @@ AcmSendTest::AcmSendTest(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),
@@ -37,25 +36,23 @@ AcmSendTest::AcmSendTest(InputAudioFile* audio_source,
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);
- acm_->RegisterTransportCallback(this);
}
-bool AcmSendTest::RegisterCodec(const char* payload_name,
- int sampling_freq_hz,
+bool AcmSendTest::RegisterCodec(int codec_type,
int channels,
int payload_type,
int frame_size_samples) {
- FATAL_ERROR_IF(AudioCodingModule::Codec(
- payload_name, &codec_, sampling_freq_hz, channels) != 0);
- codec_.pltype = payload_type;
- codec_.pacsize = frame_size_samples;
- codec_registered_ = (acm_->RegisterSendCodec(codec_) == 0);
- assert(channels == 1); // TODO(henrik.lundin) Add multi-channel support.
+ 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);
@@ -73,11 +70,16 @@ Packet* AcmSendTest::NextPacket() {
// Insert audio and process until one packet is produced.
while (clock_.TimeInMilliseconds() < test_duration_ms_) {
clock_.AdvanceTimeMilliseconds(kBlockSizeMs);
- FATAL_ERROR_IF(
- !audio_source_->Read(input_block_size_samples_, input_frame_.data_));
- FATAL_ERROR_IF(acm_->Add10MsData(input_frame_) != 0);
+ 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_;
- int32_t encoded_bytes = acm_->Process();
if (encoded_bytes > 0) {
// Encoded packet received.
return CreatePacket();
diff --git a/modules/audio_coding/main/acm2/acm_send_test.h b/modules/audio_coding/main/acm2/acm_send_test.h
index 5e9bd977..8bc0cde0 100644
--- a/modules/audio_coding/main/acm2/acm_send_test.h
+++ b/modules/audio_coding/main/acm2/acm_send_test.h
@@ -33,8 +33,7 @@ class AcmSendTest : public AudioPacketizationCallback, public PacketSource {
virtual ~AcmSendTest() {}
// Registers the send codec. Returns true on success, false otherwise.
- bool RegisterCodec(const char* payload_name,
- int sampling_freq_hz,
+ bool RegisterCodec(int codec_type,
int channels,
int payload_type,
int frame_size_samples);
@@ -42,7 +41,7 @@ class AcmSendTest : public AudioPacketizationCallback, public PacketSource {
// 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();
+ virtual Packet* NextPacket() OVERRIDE;
// Inherited from AudioPacketizationCallback.
virtual int32_t SendData(
@@ -62,12 +61,11 @@ class AcmSendTest : public AudioPacketizationCallback, public PacketSource {
Packet* CreatePacket();
SimulatedClock clock_;
- scoped_ptr<AudioCodingModule> acm_;
+ scoped_ptr<AudioCoding> 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.
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 00000000..2f5178e0
--- /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 00000000..ff229a0a
--- /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 c4d7628d..85ead390 100644
--- a/modules/audio_coding/main/acm2/acm_speex.cc
+++ b/modules/audio_coding/main/acm2/acm_speex.cc
@@ -58,8 +58,6 @@ void ACMSPEEX::DestructEncoderSafe() { return; }
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 @@ int16_t ACMSPEEX::SetBitRateSafe(const int32_t rate) {
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 f9cf7870..931e3a9f 100644
--- a/modules/audio_coding/main/acm2/acm_speex.h
+++ b/modules/audio_coding/main/acm2/acm_speex.h
@@ -38,8 +38,6 @@ class ACMSPEEX : public ACMGenericCodec {
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 eca909cc..9b61d334 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 @@ bool AudioCodingModule::IsCodecValid(const CodecInst& codec) {
}
}
+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 f88dbd37..d746a80b 100644
--- a/modules/audio_coding/main/acm2/audio_coding_module.gypi
+++ b/modules/audio_coding/main/acm2/audio_coding_module.gypi
@@ -119,7 +119,11 @@
{
'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',
@@ -127,12 +131,18 @@
'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',
@@ -140,6 +150,8 @@
'sources': [
'acm_send_test.cc',
'acm_send_test.h',
+ 'acm_send_test_oldapi.cc',
+ 'acm_send_test_oldapi.h',
],
}, # acm_send_test
{
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 164c0bbf..687c5b81 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"
@@ -1786,15 +1787,6 @@ int AudioCodingModuleImpl::NetworkStatistics(ACMNetworkStatistics* statistics) {
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()");
@@ -1911,13 +1903,13 @@ int AudioCodingModuleImpl::ConfigISACBandwidthEstimator(
frame_size_ms, rate_bit_per_sec, enforce_frame_size);
}
-// Informs Opus encoder about the maximum audio bandwidth needs to be encoded.
-int AudioCodingModuleImpl::SetOpusMaxBandwidth(int bandwidth_hz) {
+// 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("SetOpusMaxBandwidth")) {
+ if (!HaveValidEncoder("SetOpusMaxPlaybackRate")) {
return -1;
}
- return codecs_[current_send_codec_idx_]->SetOpusMaxBandwidth(bandwidth_hz);
+ return codecs_[current_send_codec_idx_]->SetOpusMaxPlaybackRate(frequency_hz);
}
int AudioCodingModuleImpl::PlayoutTimestamp(uint32_t* timestamp) {
@@ -2053,4 +2045,268 @@ void AudioCodingModuleImpl::GetDecodingCallStatistics(
} // 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(&current_send_codec_) != 0) {
+ return NULL;
+ }
+ return &current_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 9e5cc370..b8d128fe 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 @@ class AudioCodingModuleImpl : public AudioCodingModule {
~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,97 +121,98 @@ class AudioCodingModuleImpl : public AudioCodingModule {
// (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.
@@ -220,31 +222,34 @@ class AudioCodingModuleImpl : public AudioCodingModule {
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;
- // If current send codec is Opus, informs it about the maximum audio
- // bandwidth needs to be encoded.
- int SetOpusMaxBandwidth(int bandwidth_hz);
+ // 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 UnregisterReceiveCodec(uint8_t payload_type);
+ virtual int UnregisterReceiveCodec(uint8_t payload_type) OVERRIDE;
- int EnableNack(size_t max_nack_list_size);
+ virtual int EnableNack(size_t max_nack_list_size) OVERRIDE;
- void DisableNack();
+ virtual void DisableNack() OVERRIDE;
- std::vector<uint16_t> GetNackList(int round_trip_time_ms) const;
+ virtual std::vector<uint16_t> GetNackList(
+ int round_trip_time_ms) const OVERRIDE;
- void GetDecodingCallStatistics(AudioDecodingCallStats* stats) const;
+ virtual void GetDecodingCallStatistics(
+ AudioDecodingCallStats* stats) const OVERRIDE;
private:
int UnregisterReceiveCodecSafe(int payload_type);
@@ -382,6 +387,94 @@ class AudioCodingModuleImpl : public AudioCodingModule {
} // 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 9c21fece..828b772e 100644
--- a/modules/audio_coding/main/acm2/audio_coding_module_unittest.cc
+++ b/modules/audio_coding/main/acm2/audio_coding_module_unittest.cc
@@ -12,7 +12,9 @@
#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"
@@ -30,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"
@@ -118,19 +119,15 @@ class PacketizationCallbackStub : public AudioPacketizationCallback {
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 SetUp() {
- acm_.reset(AudioCodingModule::Create(id_, clock_));
-
- RegisterCodec();
+ void TearDown() OVERRIDE {}
+ void SetUp() OVERRIDE {
rtp_utility_->Populate(&rtp_header_);
input_frame_.sample_rate_hz_ = kSampleRateHz;
@@ -141,17 +138,32 @@ class AudioCodingModuleTest : public ::testing::Test {
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() {
@@ -161,41 +173,33 @@ class AudioCodingModuleTest : public ::testing::Test {
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);
@@ -209,10 +213,10 @@ TEST_F(AudioCodingModuleTest, DISABLED_ON_ANDROID(InitializedToZero)) {
// 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;
@@ -232,6 +236,7 @@ TEST_F(AudioCodingModuleTest, DISABLED_ON_ANDROID(SilenceGeneratorCalled)) {
// 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;
@@ -263,21 +268,16 @@ TEST_F(AudioCodingModuleTest, DISABLED_ON_ANDROID(NetEqCalls)) {
}
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 {
@@ -306,11 +306,12 @@ class AudioCodingModuleMtTest : public AudioCodingModuleTest {
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();
}
@@ -321,7 +322,7 @@ class AudioCodingModuleMtTest : public AudioCodingModuleTest {
ASSERT_TRUE(pull_audio_thread_->Start(thread_id));
}
- void TearDown() {
+ virtual void TearDown() OVERRIDE {
AudioCodingModuleTest::TearDown();
pull_audio_thread_->Stop();
send_thread_->Stop();
@@ -357,7 +358,6 @@ class AudioCodingModuleMtTest : public AudioCodingModuleTest {
}
++send_count_;
InsertAudio();
- Encode();
if (TestDone()) {
test_complete_->Set();
}
@@ -373,7 +373,7 @@ class AudioCodingModuleMtTest : public AudioCodingModuleTest {
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;
@@ -394,7 +394,7 @@ class AudioCodingModuleMtTest : public AudioCodingModuleTest {
{
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_;
@@ -437,8 +437,9 @@ class AcmIsacMtTest : public AudioCodingModuleMtTest {
~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.
@@ -450,7 +451,6 @@ class AcmIsacMtTest : public AudioCodingModuleMtTest {
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
@@ -460,18 +460,17 @@ class AcmIsacMtTest : public AudioCodingModuleMtTest {
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.
@@ -484,22 +483,18 @@ class AcmIsacMtTest : public AudioCodingModuleMtTest {
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) {
@@ -556,7 +551,8 @@ class AcmReceiverBitExactness : public ::testing::Test {
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 test(packet_source.get(), &output, output_freq_hz,
+ test::AcmReceiveTest::kArbitraryChannels);
ASSERT_NO_FATAL_FAILURE(test.RegisterNetEqTestCodecs());
test.Run();
@@ -633,26 +629,23 @@ class AcmSenderBitExactness : public ::testing::Test,
// 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,
+ 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(payload_name,
- sampling_freq_hz,
- channels,
- payload_type,
- frame_size_samples);
+ 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) {
+ 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;
@@ -668,7 +661,8 @@ class AcmSenderBitExactness : public ::testing::Test,
// 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);
+ test::AcmReceiveTest receive_test(
+ this, &output, kOutputFreqHz, expected_channels);
ASSERT_NO_FATAL_FAILURE(receive_test.RegisterDefaultCodecs());
// This is where the actual test is executed.
@@ -691,7 +685,7 @@ class AcmSenderBitExactness : public ::testing::Test,
// 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 {
+ 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();
@@ -725,15 +719,13 @@ class AcmSenderBitExactness : public ::testing::Test,
payload_checksum_.Update(packet->payload(), packet->payload_length_bytes());
}
- void SetUpTest(const char* codec_name,
- int codec_sample_rate_hz,
+ 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_name,
- codec_sample_rate_hz,
+ ASSERT_TRUE(RegisterSendCodec(codec_type,
channels,
payload_type,
codec_frame_size_samples,
@@ -751,7 +743,7 @@ class AcmSenderBitExactness : public ::testing::Test,
};
TEST_F(AcmSenderBitExactness, IsacWb30ms) {
- ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 16000, 1, 103, 480, 480));
+ ASSERT_NO_FATAL_FAILURE(SetUpTest(acm2::ACMCodecDB::kISAC, 1, 103, 480, 480));
Run(AcmReceiverBitExactness::PlatformChecksum(
"c7e5bdadfa2871df95639fcc297cf23d",
"0499ca260390769b3172136faad925b9",
@@ -760,11 +752,12 @@ TEST_F(AcmSenderBitExactness, IsacWb30ms) {
"d42cb5195463da26c8129bbfe73a22e6",
"83de248aea9c3c2bd680b6952401b4ca",
"3c79f16f34218271f3dca4e2b1dfe1bb"),
- 33);
+ 33,
+ test::AcmReceiveTest::kMonoOutput);
}
TEST_F(AcmSenderBitExactness, IsacWb60ms) {
- ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 16000, 1, 103, 960, 960));
+ ASSERT_NO_FATAL_FAILURE(SetUpTest(acm2::ACMCodecDB::kISAC, 1, 103, 960, 960));
Run(AcmReceiverBitExactness::PlatformChecksum(
"14d63c5f08127d280e722e3191b73bdd",
"8da003e16c5371af2dc2be79a50f9076",
@@ -773,7 +766,167 @@ TEST_F(AcmSenderBitExactness, IsacWb60ms) {
"ebe04a819d3a9d83a83a17f271e1139a",
"97aeef98553b5a4b5a68f8b716e8eaf0",
"9e0a0ab743ad987b55b8e14802769c56"),
- 16);
+ 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 00000000..0e9d2736
--- /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 61aadd73..2bee9646 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 38b7cfc2..4bf9437d 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 5837c31a..7863c75b 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 aae7ead7..8d73285a 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"
@@ -916,21 +917,20 @@ class AudioCodingModule: public Module {
bool enforce_frame_size = false) = 0;
///////////////////////////////////////////////////////////////////////////
- // int SetOpusMaxBandwidth()
- // If current send codec is Opus, informs it about maximum audio bandwidth
- // needs to be encoded. A use case of this is when the receiver can only play
- // audio up to frequency limit. Opus can use this information to optimize
- // the bit rate and increase the computation efficiency.
+ // 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:
- // -banbwidth_hz : maximum bandwidth in Hz.
+ // -frequency_hz : maximum playback rate in Hz.
//
// Return value:
// -1 if current send codec is not Opus or
- // error occurred in setting the bandwidth,
+ // error occurred in setting the maximum playback rate,
// 0 maximum bandwidth is set successfully.
//
- virtual int SetOpusMaxBandwidth(int banbwidth_hz) = 0;
+ virtual int SetOpusMaxPlaybackRate(int frequency_hz) = 0;
///////////////////////////////////////////////////////////////////////////
// statistics
@@ -999,6 +999,186 @@ class AudioCodingModule: public Module {
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.h b/modules/audio_coding/main/test/ACMTest.h
index 767add17..f73961f5 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 7611c9d6..cdb99c03 100644
--- a/modules/audio_coding/main/test/Channel.h
+++ b/modules/audio_coding/main/test/Channel.h
@@ -50,10 +50,11 @@ class Channel : public AudioPacketizationCallback {
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.h b/modules/audio_coding/main/test/EncodeDecodeTest.h
index dbe3f0cb..693c96e0 100644
--- a/modules/audio_coding/main/test/EncodeDecodeTest.h
+++ b/modules/audio_coding/main/test/EncodeDecodeTest.h
@@ -29,10 +29,11 @@ class TestPacketization : public AudioPacketizationCallback {
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 @@ class EncodeDecodeTest : public ACMTest {
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 ce189548..4f46098a 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 b886bde0..b7f587b8 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,10 +234,10 @@ uint16_t RTPFile::Read(WebRtcRTPHeader* rtpInfo, uint8_t* payloadData,
if (plen == 0) {
return 0;
}
- if (payloadSize < (lengthBytes - 20)) {
+ if (lengthBytes < 20) {
return 0;
}
- if (lengthBytes < 20) {
+ if (payloadSize < (lengthBytes - 20)) {
return 0;
}
lengthBytes -= 20;
diff --git a/modules/audio_coding/main/test/RTPFile.h b/modules/audio_coding/main/test/RTPFile.h
index 9b6d5fca..460553be 100644
--- a/modules/audio_coding/main/test/RTPFile.h
+++ b/modules/audio_coding/main/test/RTPFile.h
@@ -65,14 +65,14 @@ class RTPBuffer : public RTPStream {
~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 @@ class RTPFile : public RTPStream {
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 10654a7a..9b7667b5 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"
diff --git a/modules/audio_coding/main/test/TestAllCodecs.h b/modules/audio_coding/main/test/TestAllCodecs.h
index 73eac47f..2fbf9ef0 100644
--- a/modules/audio_coding/main/test/TestAllCodecs.h
+++ b/modules/audio_coding/main/test/TestAllCodecs.h
@@ -28,10 +28,11 @@ class TestPack : public AudioPacketizationCallback {
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 @@ class TestAllCodecs : public ACMTest {
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
diff --git a/modules/audio_coding/main/test/TestStereo.cc b/modules/audio_coding/main/test/TestStereo.cc
index b9677e37..9c22548a 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"
diff --git a/modules/audio_coding/main/test/TestStereo.h b/modules/audio_coding/main/test/TestStereo.h
index 9cb70e91..8aefa7fc 100644
--- a/modules/audio_coding/main/test/TestStereo.h
+++ b/modules/audio_coding/main/test/TestStereo.h
@@ -33,12 +33,13 @@ class TestPackStereo : public AudioPacketizationCallback {
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();
@@ -63,7 +64,7 @@ class TestStereo : public ACMTest {
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 237b329e..ef9609a2 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 81ef0c3f..b5592d07 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 71657c9f..7cd2466f 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 @@ class DualStreamTest : public AudioPacketizationCallback,
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 192539d8..0b7aad18 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 398a6b3e..0173ac1d 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/target_delay_unittest.cc b/modules/audio_coding/main/test/target_delay_unittest.cc
index 5636bdf8..02b8467b 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 cf623ca0..530044e6 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_unittest.cc b/modules/audio_coding/neteq/audio_decoder_unittest.cc
index 687a733c..624e6a4d 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"
@@ -348,14 +348,11 @@ class AudioDecoderIsacFloatTest : public AudioDecoderTest {
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;
}
@@ -388,14 +385,11 @@ class AudioDecoderIsacSwbTest : public AudioDecoderTest {
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;
}
@@ -441,14 +435,11 @@ class AudioDecoderIsacFixTest : public AudioDecoderTest {
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;
}
diff --git a/modules/audio_coding/neteq/audio_decoder_unittests.isolate b/modules/audio_coding/neteq/audio_decoder_unittests.isolate
index bb57e74b..e4a18ca8 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 5a208a69..b19eef98 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::Zeros(size_t length) {
}
}
-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 @@ bool AudioMultiVector::Empty() const {
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 908de936..27f377e8 100644
--- a/modules/audio_coding/neteq/audio_multi_vector.h
+++ b/modules/audio_coding/neteq/audio_multi_vector.h
@@ -43,7 +43,7 @@ class AudioMultiVector {
// 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 @@ class AudioMultiVector {
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 94760385..1921dc25 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 @@ TEST_P(AudioMultiVectorTest, PushBackInterleavedAndCopy) {
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 @@ TEST_P(AudioMultiVectorTest, PushBackInterleavedAndCopy) {
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 @@ TEST_P(AudioMultiVectorTest, CopyToNull) {
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_P(AudioMultiVectorTest, OverwriteAt) {
}
}
+// 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 d9fb4e58..ef24ea2a 100644
--- a/modules/audio_coding/neteq/audio_vector.cc
+++ b/modules/audio_coding/neteq/audio_vector.cc
@@ -22,7 +22,7 @@ void AudioVector::Clear() {
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 f8aabdb8..3e025a4c 100644
--- a/modules/audio_coding/neteq/audio_vector.h
+++ b/modules/audio_coding/neteq/audio_vector.h
@@ -43,7 +43,7 @@ class AudioVector {
// 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 50da1fb4..08009863 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 @@ TEST_F(AudioVectorTest, PushBackAndCopy) {
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 @@ TEST_F(AudioVectorTest, PushBackAndCopy) {
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 @@ TEST_F(AudioVectorTest, CopyToNull) {
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_unittest.cc b/modules/audio_coding/neteq/background_noise_unittest.cc
index 0aee62c9..bd69d670 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 9589099d..4151a9b1 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 6a1bbe0d..cc636a17 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 97a8843a..9e422041 100644
--- a/modules/audio_coding/neteq/decision_logic_normal.cc
+++ b/modules/audio_coding/neteq/decision_logic_normal.cc
@@ -76,8 +76,10 @@ Operations DecisionLogicNormal::GetDecisionSpecialized(
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 f9056a6c..499f9464 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 d0c6f5ae..6f497199 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 6f973323..30e7647b 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 080309be..c40f3991 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 cbceff61..a052a588 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 83f98138..4824b2ba 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 34c615d7..3429bcda 100644
--- a/modules/audio_coding/neteq/dtmf_tone_generator.cc
+++ b/modules/audio_coding/neteq/dtmf_tone_generator.cc
@@ -158,10 +158,6 @@ int DtmfToneGenerator::Generate(int num_samples,
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 @@ int DtmfToneGenerator::Generate(int num_samples,
(*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 fc1e5e4a..232eba4c 100644
--- a/modules/audio_coding/neteq/dtmf_tone_generator.h
+++ b/modules/audio_coding/neteq/dtmf_tone_generator.h
@@ -24,7 +24,6 @@ class DtmfToneGenerator {
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 94f79dc3..ccd7fa60 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 @@ TEST(DtmfToneGenerator, TestErrors) {
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 bf0fa68a..1f46e66c 100644
--- a/modules/audio_coding/neteq/expand.cc
+++ b/modules/audio_coding/neteq/expand.cc
@@ -511,7 +511,7 @@ void Expand::AnalyzeSignal(int16_t* random_vector) {
parameters.expand_vector0.Clear();
parameters.expand_vector0.PushBack(vector1, expansion_length);
// Copy from expand_vector0 to expand_vector1.
- parameters.expand_vector0.CopyFrom(&parameters.expand_vector1);
+ parameters.expand_vector0.CopyTo(&parameters.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.
diff --git a/modules/audio_coding/neteq/expand_unittest.cc b/modules/audio_coding/neteq/expand_unittest.cc
index bd39f408..68b4f60f 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/merge_unittest.cc b/modules/audio_coding/neteq/merge_unittest.cc
index fb5f789f..bdcbbb8a 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 edf3b54e..f3cecc24 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 a5a787c7..a35a26a2 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 d9210668..ebc6acda 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 583fa54b..d127c5d8 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 c21a1c28..1d2dc8ea 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 26e09329..fa5cd7ed 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 0351d6b1..c76ffaf9 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 3bed4d15..881e9005 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 00000000..45e3239f
--- /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 9522b537..ef5e03e5 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 2882248c..74eea6f0 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 f1665423..09fa4e12 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.gypi b/modules/audio_coding/neteq/neteq.gypi
index 21ccee41..01143bc5 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 a4010765..6a8eafa1 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 @@ class NetEqExternalDecoderTest : public ::testing::Test {
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 @@ class NetEqExternalDecoderTest : public ::testing::Test {
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 @@ class NetEqExternalDecoderTest : public ::testing::Test {
// 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 @@ class NetEqExternalDecoderTest : public ::testing::Test {
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 @@ class NetEqExternalDecoderTest : public ::testing::Test {
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 @@ class NetEqExternalDecoderTest : public ::testing::Test {
} 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 @@ class NetEqExternalDecoderTest : public ::testing::Test {
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 @@ class NetEqExternalDecoderTest : public ::testing::Test {
}
}
- 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 @@ TEST_F(NetEqExternalDecoderTest, RunTest) {
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 a184fc33..d7147335 100644
--- a/modules/audio_coding/neteq/neteq_impl.cc
+++ b/modules/audio_coding/neteq/neteq_impl.cc
@@ -864,9 +864,6 @@ int NetEqImpl::GetDecision(Operations* operation,
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) {
@@ -1817,6 +1814,14 @@ int NetEqImpl::ExtractPackets(int required_samples, PacketList* packet_list) {
}
} 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;
}
diff --git a/modules/audio_coding/neteq/neteq_impl.h b/modules/audio_coding/neteq/neteq_impl.h
index bc7734b4..cfe6a402 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 {
@@ -82,7 +82,7 @@ class NetEqImpl : public webrtc::NetEq {
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 @@ class NetEqImpl : public webrtc::NetEq {
// 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 @@ class NetEqImpl : public webrtc::NetEq {
// 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,80 +119,81 @@ class NetEqImpl : public webrtc::NetEq {
// 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;
+ 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;
diff --git a/modules/audio_coding/neteq/neteq_impl_unittest.cc b/modules/audio_coding/neteq/neteq_impl_unittest.cc
index 402d79db..d5676d7b 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"
diff --git a/modules/audio_coding/neteq/neteq_stereo_unittest.cc b/modules/audio_coding/neteq/neteq_stereo_unittest.cc
index 3c695c81..c9a10dff 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_unittest.cc b/modules/audio_coding/neteq/neteq_unittest.cc
index d60077df..256c557d 100644
--- a/modules/audio_coding/neteq/neteq_unittest.cc
+++ b/modules/audio_coding/neteq/neteq_unittest.cc
@@ -24,7 +24,7 @@
#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"
diff --git a/modules/audio_coding/neteq/normal.cc b/modules/audio_coding/neteq/normal.cc
index bfde179b..46d03fb8 100644
--- a/modules/audio_coding/neteq/normal.cc
+++ b/modules/audio_coding/neteq/normal.cc
@@ -37,6 +37,11 @@ int Normal::Process(const int16_t* input,
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 @@ int Normal::Process(const int16_t* input,
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 c855865c..e96359a9 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 @@ TEST(Normal, CreateAndDestroy) {
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 5e6b89fd..d8af556c 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 9d0aaa1d..cf29581a 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"
diff --git a/modules/audio_coding/neteq/post_decode_vad_unittest.cc b/modules/audio_coding/neteq/post_decode_vad_unittest.cc
index ed48db85..65efa7a2 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 cbdcdf7c..ad8e32de 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 1a3d0fe7..332ec2f4 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/RTPcat.cc b/modules/audio_coding/neteq/test/RTPcat.cc
index f06b574f..19a34ec2 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 93b366b9..92bccee2 100644
--- a/modules/audio_coding/neteq/test/RTPencode.cc
+++ b/modules/audio_coding/neteq/test/RTPencode.cc
@@ -1632,9 +1632,13 @@ int NetEQTest_encode(int coder, int16_t *indata, int frameLen, unsigned char * e
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 NetEQTest_encode(int coder, int16_t *indata, int frameLen, unsigned char * e
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 eeb4c901..75983d25 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 compare_arr_time(const void *x, const void *y);
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");
-
- printf("RTP_infile : RTP stream input file\n\n");
-
- printf("dat_file : file with packet arrival times in ms\n\n");
-
- printf("RTP_outfile : RTP stream output file\n\n");
-
- 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;
- }
-
- 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 (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("dat_file : file with packet arrival times in ms\n\n");
+
+ printf("RTP_outfile : RTP stream output file\n\n");
+
+ 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]);
+
+ // 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);
-
-
- 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 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
- }
-
- if (Npack == 0) {
- fprintf(stderr, "Error: No RTP packet found.\n");
- goto closing;
- }
-
- packet_ptr = (unsigned char **) malloc(Npack*sizeof(unsigned char*));
-
- 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;
- }
- }
- }
+ 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;
+ }
+
+ // 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;
+
+ // 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++;
+
+ // read length of next packet.
+ len=(uint16_t) fread(&rtp_vec[rtp_len], sizeof(unsigned char), 2, in_file);
+ }
+
+ if (Npack == 0) {
+ fprintf(stderr, "Error: No RTP packet found.\n");
+ goto closing;
+ }
+
+ packet_ptr = (unsigned char **) malloc(Npack*sizeof(unsigned char*));
+
+ 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 15ffdf6a..f27819d0 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
index 6b0f4828..b672a0c2 100644
--- a/modules/audio_coding/neteq/test/neteq_isac_quality_test.cc
+++ b/modules/audio_coding/neteq/test/neteq_isac_quality_test.cc
@@ -138,8 +138,7 @@ int NetEqIsacQualityTest::EncodeBlock(int16_t* in_data,
// 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],
- reinterpret_cast<int16_t*>(payload));
+ value = WebRtcIsacfix_Encode(isac_encoder_, &in_data[pointer], payload);
}
EXPECT_GT(value, 0);
return value;
diff --git a/modules/audio_coding/neteq/time_stretch_unittest.cc b/modules/audio_coding/neteq/time_stretch_unittest.cc
index 64789b4d..3d1e0693 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_unittest.cc b/modules/audio_coding/neteq/timestamp_scaler_unittest.cc
index 1cbbf7f3..4b6d940a 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"
diff --git a/modules/audio_coding/neteq/tools/input_audio_file.cc b/modules/audio_coding/neteq/tools/input_audio_file.cc
index 80631732..6bbb3286 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 @@ bool InputAudioFile::Read(size_t samples, int16_t* destination) {
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 274f8ea0..f546119b 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 @@ class InputAudioFile {
// 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 00000000..13d847b7
--- /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/packet_unittest.cc b/modules/audio_coding/neteq/tools/packet_unittest.cc
index df844ee8..10bcc5cf 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_generator.cc b/modules/audio_coding/neteq/tools/rtp_generator.cc
index 17ac209f..db9988d9 100644
--- a/modules/audio_coding/neteq/tools/rtp_generator.cc
+++ b/modules/audio_coding/neteq/tools/rtp_generator.cc
@@ -44,5 +44,19 @@ void RtpGenerator::set_drift_factor(double factor) {
}
}
+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 d3824c8d..22804361 100644
--- a/modules/audio_coding/neteq/tools/rtp_generator.h
+++ b/modules/audio_coding/neteq/tools/rtp_generator.h
@@ -34,24 +34,50 @@ class RtpGenerator {
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 c4cc0856..5e46f9b8 100644
--- a/modules/audio_coding_module.target.darwin-arm.mk
+++ b/modules/audio_coding_module.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -77,13 +75,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -121,12 +120,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -182,6 +184,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -199,7 +202,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -217,13 +219,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -261,12 +263,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -323,6 +328,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -341,50 +347,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 2bd0cd3e..30a38e34 100644
--- a/modules/audio_coding_module.target.darwin-arm64.mk
+++ b/modules/audio_coding_module.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -88,6 +86,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -110,12 +109,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +170,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -183,7 +186,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -235,12 +237,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -294,6 +299,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -311,42 +317,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 df8ba414..64dd5d82 100644
--- a/modules/audio_coding_module.target.darwin-mips.mk
+++ b/modules/audio_coding_module.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -78,8 +76,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -94,6 +90,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -117,12 +114,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +177,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -194,7 +195,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -213,8 +213,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -252,12 +250,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +314,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -331,46 +333,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/audio_coding_module.target.darwin-x86.mk
index 2a9adcc6..4b19bd5f 100644
--- a/modules/audio_coding_module.target.darwin-x86.mk
+++ b/modules/audio_coding_module.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -93,6 +91,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -116,12 +115,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +176,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -189,7 +192,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -247,12 +249,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +311,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -323,46 +329,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 2d49e0fd..1406cfd3 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 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -92,6 +90,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -115,12 +114,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +175,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -189,7 +192,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -245,12 +247,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -304,6 +309,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -321,46 +327,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 c4cc0856..5e46f9b8 100644
--- a/modules/audio_coding_module.target.linux-arm.mk
+++ b/modules/audio_coding_module.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -77,13 +75,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -121,12 +120,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -182,6 +184,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -199,7 +202,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -217,13 +219,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -261,12 +263,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -323,6 +328,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -341,50 +347,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 2bd0cd3e..30a38e34 100644
--- a/modules/audio_coding_module.target.linux-arm64.mk
+++ b/modules/audio_coding_module.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -88,6 +86,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -110,12 +109,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +170,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -183,7 +186,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -235,12 +237,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -294,6 +299,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -311,42 +317,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 df8ba414..64dd5d82 100644
--- a/modules/audio_coding_module.target.linux-mips.mk
+++ b/modules/audio_coding_module.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -78,8 +76,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -94,6 +90,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -117,12 +114,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +177,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -194,7 +195,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -213,8 +213,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -252,12 +250,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +314,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -331,46 +333,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/audio_coding_module.target.linux-x86.mk
index 2a9adcc6..4b19bd5f 100644
--- a/modules/audio_coding_module.target.linux-x86.mk
+++ b/modules/audio_coding_module.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -93,6 +91,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -116,12 +115,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +176,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -189,7 +192,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -247,12 +249,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +311,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -323,46 +329,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 2d49e0fd..1406cfd3 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 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -92,6 +90,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -115,12 +114,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +175,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -189,7 +192,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -245,12 +247,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -304,6 +309,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -321,46 +327,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 2e39e595..0140c91b 100644
--- a/modules/audio_conference_mixer.target.darwin-arm.mk
+++ b/modules/audio_conference_mixer.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -53,13 +51,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -97,12 +96,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +145,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -160,7 +163,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -178,13 +180,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -222,12 +224,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +274,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -287,50 +293,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 f7e2fb0d..57eaa617 100644
--- a/modules/audio_conference_mixer.target.darwin-arm64.mk
+++ b/modules/audio_conference_mixer.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -64,6 +62,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -86,12 +85,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +131,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -144,7 +147,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -196,12 +198,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +245,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -257,42 +263,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 6ad3b355..b39c7b4e 100644
--- a/modules/audio_conference_mixer.target.darwin-mips.mk
+++ b/modules/audio_conference_mixer.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -54,8 +52,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -70,6 +66,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -93,12 +90,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -138,6 +138,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -155,7 +156,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -174,8 +174,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -213,12 +211,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +260,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -277,46 +279,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/audio_conference_mixer.target.darwin-x86.mk
index 2675be94..538b871e 100644
--- a/modules/audio_conference_mixer.target.darwin-x86.mk
+++ b/modules/audio_conference_mixer.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -69,6 +67,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -92,12 +91,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +137,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +153,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -208,12 +210,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +257,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -269,46 +275,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 70939814..d65d7a1f 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 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -68,6 +66,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -91,12 +90,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +136,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +153,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -206,12 +208,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +255,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -267,46 +273,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 2e39e595..0140c91b 100644
--- a/modules/audio_conference_mixer.target.linux-arm.mk
+++ b/modules/audio_conference_mixer.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -53,13 +51,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -97,12 +96,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +145,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -160,7 +163,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -178,13 +180,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -222,12 +224,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +274,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -287,50 +293,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 f7e2fb0d..57eaa617 100644
--- a/modules/audio_conference_mixer.target.linux-arm64.mk
+++ b/modules/audio_conference_mixer.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -64,6 +62,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -86,12 +85,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +131,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -144,7 +147,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -196,12 +198,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +245,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -257,42 +263,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 6ad3b355..b39c7b4e 100644
--- a/modules/audio_conference_mixer.target.linux-mips.mk
+++ b/modules/audio_conference_mixer.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -54,8 +52,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -70,6 +66,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -93,12 +90,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -138,6 +138,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -155,7 +156,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -174,8 +174,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -213,12 +211,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +260,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -277,46 +279,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/audio_conference_mixer.target.linux-x86.mk
index 2675be94..538b871e 100644
--- a/modules/audio_conference_mixer.target.linux-x86.mk
+++ b/modules/audio_conference_mixer.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -69,6 +67,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -92,12 +91,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +137,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +153,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -208,12 +210,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +257,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -269,46 +275,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 70939814..d65d7a1f 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 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -68,6 +66,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -91,12 +90,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +136,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +153,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -206,12 +208,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +255,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -267,46 +273,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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
index a27bb84c..a94d0052 100644
--- a/modules/audio_conference_mixer/BUILD.gn
+++ b/modules/audio_conference_mixer/BUILD.gn
@@ -7,7 +7,7 @@
# 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.
+ visibility = [ ":*" ] # Only targets in this file can depend on this.
include_dirs = [
"interface",
"../interface",
@@ -33,6 +33,12 @@ source_set("audio_conference_mixer") {
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",
diff --git a/modules/audio_conference_mixer/OWNERS b/modules/audio_conference_mixer/OWNERS
index 7d4cc610..940b245d 100644
--- a/modules/audio_conference_mixer/OWNERS
+++ b/modules/audio_conference_mixer/OWNERS
@@ -1,5 +1,4 @@
henrike@webrtc.org
-pwestin@webrtc.org
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 2969eceb..6290c222 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 @@ public:
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 a90ff1dc..00000000
--- 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.h b/modules/audio_conference_mixer/source/audio_conference_mixer_impl.h
index 44f4ff04..2756314c 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 @@ public:
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};
diff --git a/modules/audio_device.target.darwin-arm.mk b/modules/audio_device.target.darwin-arm.mk
index b6dedb6f..0d40dc62 100644
--- a/modules/audio_device.target.darwin-arm.mk
+++ b/modules/audio_device.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -56,13 +54,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -100,12 +99,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +155,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -170,7 +173,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -188,13 +190,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -232,12 +234,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +291,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -304,50 +310,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 cbaf8ea2..13f8aca8 100644
--- a/modules/audio_device.target.darwin-arm64.mk
+++ b/modules/audio_device.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +141,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -154,7 +157,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -206,12 +208,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +262,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -274,42 +280,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 af180d76..d44a2367 100644
--- a/modules/audio_device.target.darwin-mips.mk
+++ b/modules/audio_device.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -57,8 +55,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -73,6 +69,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -96,12 +93,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +148,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -165,7 +166,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -184,8 +184,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -223,12 +221,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -276,6 +277,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -294,46 +296,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/audio_device.target.darwin-x86.mk
index f67af9c9..94aee5dd 100644
--- a/modules/audio_device.target.darwin-x86.mk
+++ b/modules/audio_device.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -72,6 +70,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -95,12 +94,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +147,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -160,7 +163,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -218,12 +220,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +274,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -286,46 +292,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 a49e0457..b913f4c6 100644
--- a/modules/audio_device.target.darwin-x86_64.mk
+++ b/modules/audio_device.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -71,6 +69,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -94,12 +93,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +146,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -160,7 +163,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -216,12 +218,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +272,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -284,46 +290,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 b6dedb6f..0d40dc62 100644
--- a/modules/audio_device.target.linux-arm.mk
+++ b/modules/audio_device.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -56,13 +54,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -100,12 +99,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +155,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -170,7 +173,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -188,13 +190,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -232,12 +234,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +291,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -304,50 +310,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 cbaf8ea2..13f8aca8 100644
--- a/modules/audio_device.target.linux-arm64.mk
+++ b/modules/audio_device.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +141,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -154,7 +157,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -206,12 +208,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +262,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -274,42 +280,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 af180d76..d44a2367 100644
--- a/modules/audio_device.target.linux-mips.mk
+++ b/modules/audio_device.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -57,8 +55,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -73,6 +69,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -96,12 +93,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +148,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -165,7 +166,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -184,8 +184,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -223,12 +221,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -276,6 +277,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -294,46 +296,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/audio_device.target.linux-x86.mk
index f67af9c9..94aee5dd 100644
--- a/modules/audio_device.target.linux-x86.mk
+++ b/modules/audio_device.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -72,6 +70,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -95,12 +94,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +147,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -160,7 +163,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -218,12 +220,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +274,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -286,46 +292,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 a49e0457..b913f4c6 100644
--- a/modules/audio_device.target.linux-x86_64.mk
+++ b/modules/audio_device.target.linux-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -71,6 +69,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -94,12 +93,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +146,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -160,7 +163,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -216,12 +218,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +272,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -284,46 +290,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 4b3b9124..00000000
--- 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
index d6481ad5..60a83dc3 100644
--- a/modules/audio_device/BUILD.gn
+++ b/modules/audio_device/BUILD.gn
@@ -8,6 +8,175 @@
import("../../build/webrtc.gni")
+config("audio_device_config") {
+ include_dirs = [
+ "../interface",
+ "include",
+ "dummy", # Contains dummy audio device implementations.
+ ]
+}
+
source_set("audio_device") {
- # TODO(henrike): Implement.
+ 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/android/OWNERS b/modules/audio_device/android/OWNERS
index e6f452e0..38865f53 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/linux/latebindingsymboltable_linux.cc b/modules/audio_device/linux/latebindingsymboltable_linux.cc
index d6a21621..4e694fa5 100644
--- a/modules/audio_device/linux/latebindingsymboltable_linux.cc
+++ b/modules/audio_device/linux/latebindingsymboltable_linux.cc
@@ -64,10 +64,19 @@ DllHandle InternalLoadDll(const char dll_name[]) {
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_processing.target.darwin-arm.mk b/modules/audio_processing.target.darwin-arm.mk
index 4c17e60b..ae20275f 100644
--- a/modules/audio_processing.target.darwin-arm.mk
+++ b/modules/audio_processing.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -78,13 +76,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -122,12 +121,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +179,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -194,7 +197,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -212,13 +214,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -256,12 +258,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -312,6 +317,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -330,51 +336,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 85027f56..cc2e8709 100644
--- a/modules/audio_processing.target.darwin-arm64.mk
+++ b/modules/audio_processing.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -88,6 +86,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -110,12 +109,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +164,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -177,7 +180,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -229,12 +231,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +287,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -299,43 +305,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 18430dfd..4f8017ee 100644
--- a/modules/audio_processing.target.darwin-mips.mk
+++ b/modules/audio_processing.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -61,7 +60,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -80,8 +78,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -96,6 +92,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -119,12 +116,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +173,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -190,7 +191,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -209,8 +209,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -248,12 +246,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +304,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -321,47 +323,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/audio_processing.target.darwin-x86.mk
index e4606bfb..763371ba 100644
--- a/modules/audio_processing.target.darwin-x86.mk
+++ b/modules/audio_processing.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -93,6 +91,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -116,12 +115,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +170,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -183,7 +186,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -241,12 +243,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -294,6 +299,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -311,47 +317,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 d6e76a74..bc0bbd25 100644
--- a/modules/audio_processing.target.darwin-x86_64.mk
+++ b/modules/audio_processing.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -92,6 +90,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -115,12 +114,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +169,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -183,7 +186,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -239,12 +241,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +297,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -309,47 +315,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 4c17e60b..ae20275f 100644
--- a/modules/audio_processing.target.linux-arm.mk
+++ b/modules/audio_processing.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -78,13 +76,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -122,12 +121,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +179,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -194,7 +197,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -212,13 +214,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -256,12 +258,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -312,6 +317,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -330,51 +336,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 85027f56..cc2e8709 100644
--- a/modules/audio_processing.target.linux-arm64.mk
+++ b/modules/audio_processing.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -88,6 +86,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -110,12 +109,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +164,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -177,7 +180,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -229,12 +231,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +287,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -299,43 +305,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 18430dfd..4f8017ee 100644
--- a/modules/audio_processing.target.linux-mips.mk
+++ b/modules/audio_processing.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -61,7 +60,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -80,8 +78,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -96,6 +92,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -119,12 +116,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +173,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -190,7 +191,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -209,8 +209,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -248,12 +246,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +304,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -321,47 +323,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/audio_processing.target.linux-x86.mk
index e4606bfb..763371ba 100644
--- a/modules/audio_processing.target.linux-x86.mk
+++ b/modules/audio_processing.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -93,6 +91,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -116,12 +115,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +170,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -183,7 +186,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -241,12 +243,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -294,6 +299,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -311,47 +317,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 d6e76a74..bc0bbd25 100644
--- a/modules/audio_processing.target.linux-x86_64.mk
+++ b/modules/audio_processing.target.linux-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -92,6 +90,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -115,12 +114,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +169,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -183,7 +186,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -239,12 +241,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +297,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -309,47 +315,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 32739081..00000000
--- 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
index a727d54b..9bf4da07 100644
--- a/modules/audio_processing/BUILD.gn
+++ b/modules/audio_processing/BUILD.gn
@@ -6,8 +6,225 @@
# 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") {
- # TODO(andrew): Implement.
+ 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 += [
+ "../../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/aec/Android.mk b/modules/audio_processing/aec/Android.mk
deleted file mode 100644
index b86ef5f9..00000000
--- a/modules/audio_processing/aec/Android.mk
+++ /dev/null
@@ -1,59 +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 \
- aec_rdft_neon.c
-
-endif # ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
diff --git a/modules/audio_processing/aec/aec_core.c b/modules/audio_processing/aec/aec_core.c
index 37ae6216..1e217eb5 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
@@ -1054,11 +1058,11 @@ static void ProcessBlock(AecCore* aec) {
#ifdef WEBRTC_AEC_DEBUG_DUMP
{
- int16_t farend[PART_LEN];
- int16_t* farend_ptr = NULL;
+ float farend[PART_LEN];
+ float* 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);
+ rtc_WavWriteSamples(aec->farFile, farend_ptr, PART_LEN);
+ rtc_WavWriteSamples(aec->nearFile, nearend_ptr, PART_LEN);
}
#endif
@@ -1208,16 +1212,8 @@ static void ProcessBlock(AecCore* aec) {
}
#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);
- }
-
- (void)fwrite(eInt16, sizeof(int16_t), PART_LEN, aec->outLinearFile);
- (void)fwrite(output, sizeof(int16_t), PART_LEN, aec->outFile);
- }
+ rtc_WavWriteSamples(aec->outLinearFile, e, PART_LEN);
+ rtc_WavWriteSamples(aec->outFile, output, PART_LEN);
#endif
}
@@ -1272,24 +1268,16 @@ int WebRtcAec_CreateAec(AecCore** aecInst) {
return -1;
}
#ifdef WEBRTC_AEC_DEBUG_DUMP
+ aec->instance_index = webrtc_aec_instance_count;
aec->far_time_buf =
- WebRtc_CreateBuffer(kBufSizePartitions, sizeof(int16_t) * PART_LEN);
+ WebRtc_CreateBuffer(kBufSizePartitions, sizeof(float) * 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");
- }
+ aec->farFile = aec->nearFile = aec->outFile = aec->outLinearFile = NULL;
+ aec->debug_dump_count = 0;
#endif
aec->delay_estimator_farend =
WebRtc_CreateDelayEstimatorFarend(PART_LEN1, kHistorySizeBlocks);
@@ -1348,10 +1336,10 @@ int WebRtcAec_FreeAec(AecCore* aec) {
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);
+ 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);
@@ -1360,6 +1348,29 @@ int WebRtcAec_FreeAec(AecCore* 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;
@@ -1400,6 +1411,18 @@ int WebRtcAec_InitAec(AecCore* aec, int sampFreq) {
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;
diff --git a/modules/audio_processing/aec/aec_core_internal.h b/modules/audio_processing/aec/aec_core_internal.h
index 8e5ee5cb..6adc4d68 100644
--- a/modules/audio_processing/aec/aec_core_internal.h
+++ b/modules/audio_processing/aec/aec_core_internal.h
@@ -11,10 +11,7 @@
#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"
@@ -141,11 +138,19 @@ struct AecCore {
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
};
diff --git a/modules/audio_processing/aec/aec_core_sse2.c b/modules/audio_processing/aec/aec_core_sse2.c
index 4d9b4efe..b1bffcbb 100644
--- a/modules/audio_processing/aec/aec_core_sse2.c
+++ b/modules/audio_processing/aec/aec_core_sse2.c
@@ -16,6 +16,7 @@
#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"
@@ -419,9 +420,312 @@ static void OverdriveAndSuppressSSE2(AecCore* aec,
}
}
+__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_mips.c b/modules/audio_processing/aec/aec_rdft_mips.c
index b19d6f2c..6e51d3a8 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,9 +268,543 @@ static void bitrv2_128_mips(float *a) {
a[119] = xi;
}
-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 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 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"
+ // 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 %[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),
+ [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 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"
+ "addiu %[tmp_a], %[a], 0 \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"
+ "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),
+ [f8] "=&f" (f8), [tmp_a] "=&r" (tmp_a), [count] "=&r" (count)
+ : [a] "r" (a)
+ : "memory"
+ );
+ 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 %[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),
+ [f8] "=&f" (f8), [tmp_a] "=&r" (tmp_a), [count] "=&r" (count)
+ : [a] "r" (a), [f9] "f" (f9)
+ : "memory"
+ );
+ 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 %[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),
+ [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"
+ );
+ 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"
+ "addiu %[tmp_a], %[a], 384 \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 %[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),
+ [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 f0, f1, f2, f3, f4, f5, f6, f7, f8;
int tmp_a, count;
cft1st_128(a);
@@ -284,52 +818,370 @@ static void cftfsub_128_mips(float *a) {
"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, f8;
+ int tmp_a, count;
+
+ cft1st_128(a);
+ cftmdl_128(a);
+
+ __asm __volatile (
+ ".set push \n\t"
+ ".set noreorder \n\t"
+ "addiu %[tmp_a], %[a], 0 \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 %[f2], 128(%[tmp_a]) \n\t"
+ "lwc1 %[f4], 256(%[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 %[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], 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), [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;
+ 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 %[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 %[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"
+ "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 %[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"
+ "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"
+ );
+}
+
+static void rftbsub_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;
+
+ a[1] = -a[1];
+ a[65] = -a[65];
+
+ __asm __volatile (
+ ".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 %[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 %[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"
+ );
+}
+
void aec_rdft_init_mips(void) {
+ cft1st_128 = cft1st_128_mips;
+ cftmdl_128 = cftmdl_128_mips;
+ rftfsub_128 = rftfsub_128_mips;
+ rftbsub_128 = rftbsub_128_mips;
cftfsub_128 = cftfsub_128_mips;
+ cftbsub_128 = cftbsub_128_mips;
bitrv2_128 = bitrv2_128_mips;
}
diff --git a/modules/audio_processing/aec/echo_cancellation.c b/modules/audio_processing/aec/echo_cancellation.c
index 72219665..e9e50dca 100644
--- a/modules/audio_processing/aec/echo_cancellation.c
+++ b/modules/audio_processing/aec/echo_cancellation.c
@@ -158,13 +158,6 @@ int32_t WebRtcAec_Create(void** aecInst) {
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 @@ int32_t WebRtcAec_Free(void* aecInst) {
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,14 +273,6 @@ int32_t WebRtcAec_Init(void* aecInst, int32_t sampFreq, int32_t scSampFreq) {
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;
}
@@ -332,10 +316,6 @@ int32_t WebRtcAec_BufferFarend(void* aecInst,
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
// Write the time-domain data to |far_pre_buf|.
WebRtc_WriteBuffer(aecpc->far_pre_buf, farend_ptr, (size_t)newNrOfSamples);
@@ -347,17 +327,14 @@ int32_t WebRtcAec_BufferFarend(void* aecInst,
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, new_farend, 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 0;
diff --git a/modules/audio_processing/aec/echo_cancellation_internal.h b/modules/audio_processing/aec/echo_cancellation_internal.h
index e939c429..91f8bab0 100644
--- a/modules/audio_processing/aec/echo_cancellation_internal.h
+++ b/modules/audio_processing/aec/echo_cancellation_internal.h
@@ -42,7 +42,6 @@ typedef struct {
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/aecm/Android.mk b/modules/audio_processing/aecm/Android.mk
deleted file mode 100644
index fc11383a..00000000
--- 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 0f348746..340eacfc 100644
--- a/modules/audio_processing/aecm/aecm_core.c
+++ b/modules/audio_processing/aecm/aecm_core.c
@@ -330,8 +330,7 @@ static void CalcLinearEnergiesC(AecmCore_t* aecm,
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 @@ int16_t WebRtcAecm_AsymFilt(const int16_t filtOld, const int16_t inVal,
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 @@ void WebRtcAecm_CalcEnergies(AecmCore_t * aecm,
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 @@ void WebRtcAecm_CalcEnergies(AecmCore_t * aecm,
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 @@ void WebRtcAecm_CalcEnergies(AecmCore_t * aecm,
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 @@ void WebRtcAecm_CalcEnergies(AecmCore_t * aecm,
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 @@ void WebRtcAecm_UpdateChannel(AecmCore_t * aecm,
{
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 00323ccd..c1cc7eba 100644
--- a/modules/audio_processing/aecm/aecm_core_c.c
+++ b/modules/audio_processing/aecm/aecm_core_c.c
@@ -270,7 +270,7 @@ static int TimeToFrequencyDomain(AecmCore_t* aecm,
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);
@@ -460,8 +460,7 @@ int WebRtcAecm_ProcessBlock(AecmCore_t * aecm,
// 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;
@@ -784,8 +783,8 @@ static void ComfortNoise(AecmCore_t* aecm,
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 4c925ca2..909a52e4 100644
--- a/modules/audio_processing/aecm/aecm_core_mips.c
+++ b/modules/audio_processing/aecm/aecm_core_mips.c
@@ -512,8 +512,7 @@ void WebRtcAecm_CalcLinearEnergies_mips(AecmCore_t* aecm,
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 @@ static int TimeToFrequencyDomain(AecmCore_t* aecm,
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;
@@ -970,8 +969,7 @@ int WebRtcAecm_ProcessBlock(AecmCore_t* aecm,
// 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;
diff --git a/modules/audio_processing/aecm/aecm_core_neon.c b/modules/audio_processing/aecm/aecm_core_neon.c
index 484ad711..40317908 100644
--- a/modules/audio_processing/aecm/aecm_core_neon.c
+++ b/modules/audio_processing/aecm/aecm_core_neon.c
@@ -267,8 +267,7 @@ void WebRtcAecm_CalcLinearEnergiesNeon(AecmCore_t* aecm,
__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 @@ void WebRtcAecm_CalcLinearEnergiesNeon(AecmCore_t* aecm,
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 35a71365..00000000
--- 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 4f110cc2..32929dda 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 @@ int WebRtcAgc_AddMic(void *state, int16_t *in_mic, int16_t *in_mic_H,
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 @@ int WebRtcAgc_AddMic(void *state, int16_t *in_mic, int16_t *in_mic_H,
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 @@ int WebRtcAgc_AddMic(void *state, int16_t *in_mic, int16_t *in_mic_H,
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 @@ int WebRtcAgc_AddMic(void *state, int16_t *in_mic, int16_t *in_mic_H,
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 @@ int WebRtcAgc_AddFarend(void *state, const int16_t *in_far, int16_t samples)
{
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 @@ int WebRtcAgc_AddFarend(void *state, const int16_t *in_far, int16_t samples)
{
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 @@ int WebRtcAgc_AddFarend(void *state, const int16_t *in_far, int16_t samples)
{
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 @@ int WebRtcAgc_AddFarend(void *state, const int16_t *in_far, int16_t samples)
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 @@ void WebRtcAgc_ZeroCtrl(Agc_t *stt, int32_t *inMicLevel, int32_t *env)
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 @@ int32_t WebRtcAgc_ProcessAnalog(void *state, int32_t inMicLevel,
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 @@ int32_t WebRtcAgc_ProcessAnalog(void *state, int32_t inMicLevel,
#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 @@ int32_t WebRtcAgc_ProcessAnalog(void *state, int32_t inMicLevel,
}
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 @@ int32_t WebRtcAgc_ProcessAnalog(void *state, int32_t inMicLevel,
#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 @@ int32_t WebRtcAgc_ProcessAnalog(void *state, int32_t inMicLevel,
#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 @@ int32_t WebRtcAgc_ProcessAnalog(void *state, int32_t inMicLevel,
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 @@ int32_t WebRtcAgc_ProcessAnalog(void *state, int32_t inMicLevel,
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 @@ int32_t WebRtcAgc_ProcessAnalog(void *state, int32_t inMicLevel,
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 @@ int32_t WebRtcAgc_ProcessAnalog(void *state, int32_t inMicLevel,
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 @@ int WebRtcAgc_Process(void *agcInst, const int16_t *in_near,
{
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 @@ int WebRtcAgc_Process(void *agcInst, const int16_t *in_near,
{
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 @@ int WebRtcAgc_Process(void *agcInst, const int16_t *in_near,
{
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 @@ int WebRtcAgc_Process(void *agcInst, const int16_t *in_near,
}
}
-#ifdef AGC_DEBUG//test log
+#ifdef WEBRTC_AGC_DEBUG_DUMP
stt->fcount++;
#endif
@@ -1352,8 +1371,10 @@ int WebRtcAgc_Process(void *agcInst, const int16_t *in_near,
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 @@ int WebRtcAgc_Process(void *agcInst, const int16_t *in_near,
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 @@ int WebRtcAgc_set_config(void *agcInst, WebRtcAgc_config_t agcConfig)
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 @@ int WebRtcAgc_Create(void **agcInst)
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 @@ int WebRtcAgc_Free(void *state)
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 @@ int WebRtcAgc_Init(void *agcInst, int32_t minLevel, int32_t maxLevel,
* 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 @@ int WebRtcAgc_Init(void *agcInst, int32_t minLevel, int32_t maxLevel,
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 @@ int WebRtcAgc_Init(void *agcInst, int32_t minLevel, int32_t maxLevel,
/* 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 b036f449..19b324f1 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 @@ typedef struct
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 d0f7b10d..da087ca3 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 @@ int32_t WebRtcAgc_CalculateGainTable(int32_t *gainTable, // Q16
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 @@ int32_t WebRtcAgc_CalculateGainTable(int32_t *gainTable, // Q16
}
}
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 @@ int32_t WebRtcAgc_CalculateGainTable(int32_t *gainTable, // Q16
{
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 @@ int32_t WebRtcAgc_CalculateGainTable(int32_t *gainTable, // Q16
{
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 @@ int32_t WebRtcAgc_InitDigital(DigitalAgc_t *stt, int16_t agcMode)
stt->gain = 65536;
stt->gatePrevious = 0;
stt->agcMode = agcMode;
-#ifdef AGC_DEBUG
+#ifdef WEBRTC_AGC_DEBUG_DUMP
stt->frameCounter = 0;
#endif
@@ -397,9 +397,14 @@ int32_t WebRtcAgc_ProcessDigital(DigitalAgc_t *stt, const int16_t *in_near,
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 @@ int32_t WebRtcAgc_ProcessDigital(DigitalAgc_t *stt, const int16_t *in_near,
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 @@ int16_t WebRtcAgc_ProcessVad(AgcVad_t *state, // (i) VAD state
// 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 6bd086fc..3dcd9375 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 @@ typedef struct
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 fb2c200e..2bbd7710 100644
--- a/modules/audio_processing/audio_buffer.cc
+++ b/modules/audio_processing/audio_buffer.cc
@@ -406,19 +406,32 @@ int AudioBuffer::samples_per_keyboard_channel() const {
// 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_;
+ }
}
}
}
diff --git a/modules/audio_processing/audio_processing.gypi b/modules/audio_processing/audio_processing.gypi
index 98d437f8..9bbcfae7 100644
--- a/modules/audio_processing/audio_processing.gypi
+++ b/modules/audio_processing/audio_processing.gypi
@@ -21,6 +21,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 +94,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'],
@@ -222,6 +226,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 cc2b5c00..d91cbd2f 100644
--- a/modules/audio_processing/audio_processing_impl.cc
+++ b/modules/audio_processing/audio_processing_impl.cc
@@ -257,10 +257,9 @@ int AudioProcessingImpl::InitializeLocked(int input_sample_rate_hz,
}
}
- // 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;
@@ -367,7 +366,8 @@ int AudioProcessingImpl::ProcessStream(const float* const* src,
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);
}
@@ -384,7 +384,8 @@ int AudioProcessingImpl::ProcessStream(const float* const* src,
#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());
@@ -480,6 +481,7 @@ int AudioProcessingImpl::ProcessStreamLocked() {
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()) {
@@ -533,7 +535,8 @@ int AudioProcessingImpl::AnalyzeReverseStream(const float* const* data,
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());
diff --git a/modules/audio_processing/audio_processing_tests.gypi b/modules/audio_processing/audio_processing_tests.gypi
index 82aa7fd1..99b80f29 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 98e36cb0..98c62412 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,37 +43,67 @@ class ChannelBuffer {
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(); }
+ const T* data() const { return data_.get(); }
+
const T* channel(int i) const {
- assert(i >= 0 && i < num_channels_);
+ DCHECK_GE(i, 0);
+ DCHECK_LT(i, num_channels_);
return channels_[i];
}
T* channel(int i) {
const ChannelBuffer<T>* t = this;
return const_cast<T*>(t->channel(i));
}
- T** channels() { return channels_.get(); }
- 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/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 bc850827..85c27783 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_CLASS := GYP
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))
@@ -61,7 +60,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -75,13 +73,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -119,12 +118,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +164,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -179,7 +182,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -193,13 +195,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -237,12 +239,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +286,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
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 bc850827..85c27783 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_CLASS := GYP
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))
@@ -61,7 +60,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -75,13 +73,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -119,12 +118,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +164,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -179,7 +182,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -193,13 +195,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -237,12 +239,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +286,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
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 9ce40373..10648cde 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_CLASS := GYP
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))
@@ -61,7 +60,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -75,13 +73,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -119,12 +118,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +164,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -179,7 +182,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -193,13 +195,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -237,12 +239,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +286,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
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 9ce40373..10648cde 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_CLASS := GYP
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))
@@ -61,7 +60,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -75,13 +73,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -119,12 +118,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +164,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -179,7 +182,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -193,13 +195,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -237,12 +239,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +286,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
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 d3275558..d4aad368 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 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -46,13 +44,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +135,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +153,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -164,13 +166,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -208,12 +210,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +257,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -270,50 +276,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 d3275558..d4aad368 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 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -46,13 +44,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +135,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +153,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -164,13 +166,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -208,12 +210,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +257,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -270,50 +276,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 eea0a04a..ab8dadae 100644
--- a/modules/audio_processing/noise_suppression_impl.cc
+++ b/modules/audio_processing/noise_suppression_impl.cc
@@ -55,6 +55,27 @@ NoiseSuppressionImpl::NoiseSuppressionImpl(const AudioProcessing* apm,
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 @@ int NoiseSuppressionImpl::ProcessCaptureAudio(AudioBuffer* audio) {
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 cadbbd9c..14abe66b 100644
--- a/modules/audio_processing/noise_suppression_impl.h
+++ b/modules/audio_processing/noise_suppression_impl.h
@@ -26,6 +26,7 @@ class NoiseSuppressionImpl : public NoiseSuppression,
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 70e33762..00000000
--- 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 d2539679..893f6c19 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 3cf889e2..093f1185 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_Init(NsHandle* NS_inst, uint32_t fs);
*/
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 075ab88c..0015e385 100644
--- a/modules/audio_processing/ns/noise_suppression.c
+++ b/modules/audio_processing/ns/noise_suppression.c
@@ -42,6 +42,9 @@ int WebRtcNs_set_policy(NsHandle* NS_inst, int mode) {
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 ec267ae0..285e4048 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 @@ void WebRtcNs_set_feature_extraction_parameters(NSinst_t* inst) {
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 @@ int WebRtcNs_InitCore(NSinst_t* inst, uint32_t fs) {
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 @@ int WebRtcNs_InitCore(NSinst_t* inst, uint32_t fs) {
}
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 @@ int WebRtcNs_InitCore(NSinst_t* inst, uint32_t fs) {
// 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
-
- //histogram quantities: used to estimate/update thresholds for features
+ // 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
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 @@ int WebRtcNs_InitCore(NSinst_t* inst, uint32_t fs) {
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 @@ int WebRtcNs_set_policy_core(NSinst_t* inst, int mode) {
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 @@ void WebRtcNs_NoiseEstimation(NSinst_t* inst, float* magn, float* noise) {
// 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 @@ void WebRtcNs_NoiseEstimation(NSinst_t* inst, float* magn, float* noise) {
}
// 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 @@ void WebRtcNs_FeatureParameterExtraction(NSinst_t* inst, int flag) {
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 @@ void WebRtcNs_FeatureParameterExtraction(NSinst_t* inst, int flag) {
}
// 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 @@ void WebRtcNs_FeatureParameterExtraction(NSinst_t* inst, int flag) {
// 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 @@ void WebRtcNs_FeatureParameterExtraction(NSinst_t* inst, int flag) {
}
}
- //compute two peaks for spectral difference
+ // compute two peaks for spectral difference
maxPeak1 = 0;
maxPeak2 = 0;
posPeak1SpecDiff = 0.0;
@@ -423,7 +450,8 @@ void WebRtcNs_FeatureParameterExtraction(NSinst_t* inst, int flag) {
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 @@ void WebRtcNs_FeatureParameterExtraction(NSinst_t* inst, int flag) {
// 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 @@ void WebRtcNs_FeatureParameterExtraction(NSinst_t* inst, int flag) {
// 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 @@ void WebRtcNs_FeatureParameterExtraction(NSinst_t* inst, int flag) {
// 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 @@ void WebRtcNs_ComputeSpectralFlatness(NSinst_t* inst, float* magnIn) {
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 @@ void WebRtcNs_ComputeSpectralFlatness(NSinst_t* inst, float* magnIn) {
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 @@ void WebRtcNs_ComputeSpectralDifference(NSinst_t* inst, float* magnIn) {
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 @@ void WebRtcNs_ComputeSpectralDifference(NSinst_t* inst, float* magnIn) {
// 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 @@ void WebRtcNs_ComputeSpectralDifference(NSinst_t* inst, float* magnIn) {
// 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 @@ void WebRtcNs_SpeechNoiseProb(NSinst_t* inst, float* probSpeechFinal, float* snr
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 @@ void WebRtcNs_SpeechNoiseProb(NSinst_t* inst, float* probSpeechFinal, float* snr
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 @@ void WebRtcNs_SpeechNoiseProb(NSinst_t* inst, float* probSpeechFinal, float* snr
// 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 @@ void WebRtcNs_SpeechNoiseProb(NSinst_t* inst, float* probSpeechFinal, float* snr
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 @@ void WebRtcNs_SpeechNoiseProb(NSinst_t* inst, float* probSpeechFinal, float* snr
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,131 +758,65 @@ void WebRtcNs_SpeechNoiseProb(NSinst_t* inst, float* probSpeechFinal, float* snr
}
}
-int WebRtcNs_ProcessCore(NSinst_t* inst,
- float* speechFrame,
- float* speechFrameHB,
- float* outFrame,
- float* outFrameHB) {
- // main routine for noise reduction
-
- 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];
+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_noise = 0.0;
- float parametric_exp = 0.0;
- float parametric_num = 0.0;
-
- // 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;
+ 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);
}
- // Check for valid pointers based on sampling rate
- if (inst->fs == 32000) {
- if (speechFrameHB == NULL) {
- return -1;
- }
- flagHB = 1;
- // range for averaging low band quantities for H band gain
- 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->analyzeBuf,
+ inst->analyzeBuf + inst->blockLen10ms,
sizeof(float) * (inst->anaLen - inst->blockLen10ms));
- memcpy(inst->dataBuf + inst->anaLen - inst->blockLen10ms, speechFrame,
+ memcpy(inst->analyzeBuf + 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,
- sizeof(float) * (inst->anaLen - inst->blockLen10ms));
- memcpy(inst->dataBufHB + inst->anaLen - inst->blockLen10ms, speechFrameHB,
- sizeof(float) * inst->blockLen10ms);
- }
-
// check if processing needed
if (inst->outLen == 0) {
// windowing
- energy1 = 0.0;
+ energy = 0.0;
for (i = 0; i < inst->anaLen; i++) {
- winData[i] = inst->window[i] * inst->dataBuf[i];
- energy1 += winData[i] * winData[i];
+ winData[i] = inst->window[i] * inst->analyzeBuf[i];
+ energy += winData[i] * winData[i];
}
- if (energy1 == 0.0) {
- // synthesize the special case of zero input
+ 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.
-
- // 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,
- sizeof(float) * (inst->anaLen - inst->blockLen));
- memset(inst->syntBuf + inst->anaLen - inst->blockLen, 0,
- sizeof(float) * inst->blockLen);
-
- // out buffer
- inst->outLen = inst->blockLen - inst->blockLen10ms;
- if (inst->blockLen > inst->blockLen10ms) {
- for (i = 0; i < inst->outLen; i++) {
- inst->outBuf[i] = fout[i + inst->blockLen10ms];
- }
- }
- for (i = 0; i < inst->blockLen10ms; ++i)
- 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->blockLen10ms; ++i)
- outFrameHB[i] = WEBRTC_SPL_SAT(
- WEBRTC_SPL_WORD16_MAX, inst->dataBufHB[i], WEBRTC_SPL_WORD16_MIN);
-
+ // 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.
+ inst->blockInd++; // Update the block index only when we process a block.
// FFT
WebRtc_rdft(inst->anaLen, 1, winData, inst->ip, inst->wfft);
@@ -848,12 +826,10 @@ int WebRtcNs_ProcessCore(NSinst_t* inst,
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]) +
+ 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;
@@ -871,7 +847,6 @@ int WebRtcNs_ProcessCore(NSinst_t* inst,
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;
@@ -886,18 +861,20 @@ int WebRtcNs_ProcessCore(NSinst_t* inst,
inst->signalEnergy = signalEnergy;
inst->sumMagn = sumMagn;
- //compute spectral flatness on input spectrum
+ // compute spectral flatness on input spectrum
WebRtcNs_ComputeSpectralFlatness(inst, magn);
// quantile noise estimate
WebRtcNs_NoiseEstimation(inst, magn, noise);
- //compute simplified noise model during startup
+ // compute simplified noise model during startup
if (inst->blockInd < END_STARTUP_SHORT) {
// Estimate White noise
- inst->whiteNoiseLevel += sumMagn / ((float)inst->magnLen) * inst->overdrive;
+ 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);
+ 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) {
@@ -917,32 +894,34 @@ int WebRtcNs_ProcessCore(NSinst_t* inst,
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 {
+ if (inst->pinkNoiseExp > 0.0f) {
// Use pink noise estimate
- parametric_num = exp(inst->pinkNoiseNumerator / (float)(inst->blockInd + 1));
+ 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)) {
+ // 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
- parametric_noise = parametric_num / pow((float)i, parametric_exp);
+ float use_band = (float)(i < kStartBand ? kStartBand : i);
+ inst->parametricNoise[i] =
+ parametric_num / pow(use_band, 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);
+ 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:
+ // 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;
@@ -950,23 +929,8 @@ int WebRtcNs_ProcessCore(NSinst_t* inst,
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
- //
+ // 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
@@ -976,32 +940,25 @@ int WebRtcNs_ProcessCore(NSinst_t* inst,
}
// 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]);
+ 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 * previousEstimateStsa[i] + ((float)1.0 - DD_PR_SNR)
- * snrLocPost[i];
+ 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
-#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
+ // 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
+ // 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])
+ // 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]--;
@@ -1019,25 +976,27 @@ int WebRtcNs_ProcessCore(NSinst_t* inst,
} 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] =
+ 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);
+ WebRtcNs_SpeechNoiseProb(inst, inst->speechProb, snrLocPrior, snrLocPost);
// time-avg parameter for noise update
gammaNoiseTmp = NOISE_UPDATE;
for (i = 0; i < inst->magnLen; i++) {
- probSpeech = probSpeechFinal[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]);
+ 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;
@@ -1048,16 +1007,20 @@ int WebRtcNs_ProcessCore(NSinst_t* inst,
}
// conservative noise update
if (probSpeech < PROB_RANGE) {
- inst->magnAvgPause[i] += GAMMA_PAUSE * (magn[i] - inst->magnAvgPause[i]);
+ 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]);
+ 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 noise update decreases the noise, it is safe, so allow it to
+ // happen
if (noiseUpdateTmp < noise[i]) {
noise[i] = noiseUpdateTmp;
}
@@ -1065,27 +1028,160 @@ int WebRtcNs_ProcessCore(NSinst_t* inst,
} // 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
- //
+ // 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;
+
+ 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;
+
+ // Check that initiation has been done
+ if (inst->initFlag != 1) {
+ return (-1);
+ }
+ // Check for valid pointers based on sampling rate
+ if (inst->fs == 32000) {
+ if (speechFrameHB == NULL) {
+ return -1;
+ }
+ flagHB = 1;
+ // range for averaging low band quantities for H band gain
+ deltaBweHB = (int)inst->magnLen / 4;
+ deltaGainHB = deltaBweHB;
+ }
+
+ // update analysis buffer for L band
+ memcpy(inst->dataBuf,
+ inst->dataBuf + inst->blockLen10ms,
+ sizeof(float) * (inst->anaLen - inst->blockLen10ms));
+ 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,
+ sizeof(float) * (inst->anaLen - inst->blockLen10ms));
+ memcpy(inst->dataBufHB + inst->anaLen - inst->blockLen10ms,
+ speechFrameHB,
+ sizeof(float) * inst->blockLen10ms);
+ }
+
+ // check if processing needed
+ if (inst->outLen == 0) {
+ // windowing
+ energy1 = 0.0;
+ for (i = 0; i < inst->anaLen; i++) {
+ winData[i] = inst->window[i] * inst->dataBuf[i];
+ energy1 += winData[i] * winData[i];
+ }
+ if (energy1 == 0.0) {
+ // synthesize the special case of zero input
+ // 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,
+ sizeof(float) * (inst->anaLen - inst->blockLen));
+ memset(inst->syntBuf + inst->anaLen - inst->blockLen,
+ 0,
+ sizeof(float) * inst->blockLen);
+
+ // out buffer
+ inst->outLen = inst->blockLen - inst->blockLen10ms;
+ if (inst->blockLen > inst->blockLen10ms) {
+ for (i = 0; i < inst->outLen; i++) {
+ inst->outBuf[i] = fout[i + inst->blockLen10ms];
+ }
+ }
+ for (i = 0; i < inst->blockLen10ms; ++i)
+ 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->blockLen10ms; ++i)
+ outFrameHB[i] = WEBRTC_SPL_SAT(
+ WEBRTC_SPL_WORD16_MAX, inst->dataBufHB[i], WEBRTC_SPL_WORD16_MIN);
+
+ return 0;
+ }
+
+ // 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);
+ if (inst->blockInd < END_STARTUP_SHORT) {
+ inst->initMagnEst[0] += magn[0];
+ inst->initMagnEst[inst->magnLen - 1] += magn[inst->magnLen - 1];
+ }
+ 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];
+ magn[i] = ((float)sqrt(fTmp)) + 1.0f;
+ if (inst->blockInd < END_STARTUP_SHORT) {
+ inst->initMagnEst[i] += magn[i];
+ }
+ }
+
+ // 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 @@ int WebRtcNs_ProcessCore(NSinst_t* inst,
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 @@ int WebRtcNs_ProcessCore(NSinst_t* inst,
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 @@ int WebRtcNs_ProcessCore(NSinst_t* inst,
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 @@ int WebRtcNs_ProcessCore(NSinst_t* inst,
}
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 @@ int WebRtcNs_ProcessCore(NSinst_t* inst,
}
}
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 @@ int WebRtcNs_ProcessCore(NSinst_t* inst,
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 @@ int WebRtcNs_ProcessCore(NSinst_t* inst,
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 @@ int WebRtcNs_ProcessCore(NSinst_t* inst,
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 @@ int WebRtcNs_ProcessCore(NSinst_t* inst,
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 785239eb..c5ca13f0 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 dataBuf[ANAL_BLOCKL_MAX];
- float syntBuf[ANAL_BLOCKL_MAX];
- float outBuf[3 * BLOCKL_MAX];
-
- int initFlag;
+ 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];
+
+ 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 @@ int WebRtcNs_InitCore(NSinst_t* inst, uint32_t fs);
*
* 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_InitCore(NSinst_t* inst, uint32_t fs);
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 @@ int WebRtcNs_set_policy_core(NSinst_t* inst, int mode);
* 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 2c8270f5..930c2c2e 100644
--- a/modules/audio_processing/ns/nsx_core.c
+++ b/modules/audio_processing/ns/nsx_core.c
@@ -503,8 +503,8 @@ static void SynthesisUpdateC(NsxInst_t* inst,
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 @@ void WebRtcNsx_CalcParametricNoiseEstimate(NsxInst_t* inst,
}
// 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 @@ void WebRtcNsx_FeatureParameterExtraction(NsxInst_t* inst, int flag) {
// 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 @@ void WebRtcNsx_FeatureParameterExtraction(NsxInst_t* inst, int flag) {
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 @@ void WebRtcNsx_ComputeSpectralFlatness(NsxInst_t* inst, uint16_t* magn) {
//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 @@ void WebRtcNsx_ComputeSpectralDifference(NsxInst_t* inst, uint16_t* magnIn) {
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 @@ void WebRtcNsx_ComputeSpectralDifference(NsxInst_t* inst, uint16_t* magnIn) {
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 @@ void WebRtcNsx_ComputeSpectralDifference(NsxInst_t* inst, uint16_t* magnIn) {
}
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 @@ void WebRtcNsx_DataSynthesis(NsxInst_t* inst, short* outFrame) {
}
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 @@ int WebRtcNsx_ProcessCore(NsxInst_t* inst, short* speechFrame, short* speechFram
// 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 @@ int WebRtcNsx_ProcessCore(NsxInst_t* inst, short* speechFrame, short* speechFram
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 @@ int WebRtcNsx_ProcessCore(NsxInst_t* inst, short* speechFrame, short* speechFram
// 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 @@ int WebRtcNsx_ProcessCore(NsxInst_t* inst, short* speechFrame, short* speechFram
// 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 @@ int WebRtcNsx_ProcessCore(NsxInst_t* inst, short* speechFrame, short* speechFram
// 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 @@ int WebRtcNsx_ProcessCore(NsxInst_t* inst, short* speechFrame, short* speechFram
}
// 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 @@ int WebRtcNsx_ProcessCore(NsxInst_t* inst, short* speechFrame, short* speechFram
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 @@ int WebRtcNsx_ProcessCore(NsxInst_t* inst, short* speechFrame, short* speechFram
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 @@ int WebRtcNsx_ProcessCore(NsxInst_t* inst, short* speechFrame, short* speechFram
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 @@ int WebRtcNsx_ProcessCore(NsxInst_t* inst, short* speechFrame, short* speechFram
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 @@ int WebRtcNsx_ProcessCore(NsxInst_t* inst, short* speechFrame, short* speechFram
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 @@ int WebRtcNsx_ProcessCore(NsxInst_t* inst, short* speechFrame, short* speechFram
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 452b96e7..2fce49b9 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 @@ void WebRtcNsx_SpeechNoiseProb(NsxInst_t* inst,
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 @@ void WebRtcNsx_SpeechNoiseProb(NsxInst_t* inst,
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 @@ void WebRtcNsx_SpeechNoiseProb(NsxInst_t* inst,
//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 @@ void WebRtcNsx_SpeechNoiseProb(NsxInst_t* inst,
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 @@ void WebRtcNsx_SpeechNoiseProb(NsxInst_t* inst,
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 @@ void WebRtcNsx_SpeechNoiseProb(NsxInst_t* inst,
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 ccb0c376..47b1b5f6 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 @@ void WebRtcNsx_SpeechNoiseProb(NsxInst_t* inst,
"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 @@ void WebRtcNsx_SpeechNoiseProb(NsxInst_t* inst,
//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 @@ void WebRtcNsx_SpeechNoiseProb(NsxInst_t* inst,
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.c b/modules/audio_processing/ns/nsx_core_neon.c
index 3490d063..4dbad9e6 100644
--- a/modules/audio_processing/ns/nsx_core_neon.c
+++ b/modules/audio_processing/ns/nsx_core_neon.c
@@ -513,7 +513,7 @@ void WebRtcNsx_SynthesisUpdateNeon(NsxInst_t* inst,
"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"
@@ -530,7 +530,7 @@ void WebRtcNsx_SynthesisUpdateNeon(NsxInst_t* inst,
"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 eaf3c9d8..00000000
--- 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 65c2d8d4..a0fb303b 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 @@ void EnableAllAPComponents(AudioProcessing* ap) {
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 WriteStatsMessage(const AudioProcessing::Statistic& output,
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 @@ void OpenFileAndWriteMessage(const std::string filename,
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 @@ TEST_F(ApmTest, Channels) {
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 @@ TEST_F(ApmTest, FloatAndIntInterfacesGiveIdenticalResults) {
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 @@ TEST_F(ApmTest, FloatAndIntInterfacesGiveIdenticalResults) {
// 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 @@ TEST_F(ApmTest, DISABLED_ON_ANDROID(Process)) {
#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 @@ TEST_F(ApmTest, DISABLED_ON_ANDROID(Process)) {
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 @@ TEST_F(ApmTest, DISABLED_ON_ANDROID(Process)) {
}
}
-#endif // WEBRTC_AUDIOPROC_BIT_EXACT
-
TEST_F(ApmTest, NoErrorsWithKeyboardChannel) {
struct ChannelFormat {
AudioProcessing::ChannelLayout in_layout;
@@ -2309,25 +2326,25 @@ TEST_P(AudioProcessingTest, Formats) {
#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 @@ INSTANTIATE_TEST_CASE_P(
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 05f4b77b..b6d51e47 100644
--- a/modules/audio_processing/test/process_test.cc
+++ b/modules/audio_processing/test/process_test.cc
@@ -59,7 +59,7 @@ void usage() {
"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 @@ void usage() {
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 @@ void void_main(int argc, char* argv[]) {
bool perf_testing = false;
bool verbose = true;
bool progress = true;
+ bool raw_output = false;
int extra_delay_ms = 0;
int override_delay_ms = 0;
@@ -427,6 +429,9 @@ void void_main(int argc, char* argv[]) {
} 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";
@@ -464,8 +469,6 @@ void void_main(int argc, char* argv[]) {
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();
@@ -486,6 +489,9 @@ void void_main(int argc, char* argv[]) {
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 {
@@ -605,13 +611,14 @@ void void_main(int argc, char* argv[]) {
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()));
@@ -627,6 +634,14 @@ void void_main(int argc, char* argv[]) {
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();
@@ -634,7 +649,7 @@ void void_main(int argc, char* argv[]) {
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 {
@@ -686,14 +701,16 @@ void void_main(int argc, char* argv[]) {
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);
@@ -769,19 +786,24 @@ void void_main(int argc, char* argv[]) {
}
}
- 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());
}
}
}
@@ -851,6 +873,14 @@ void void_main(int argc, char* argv[]) {
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);
@@ -995,12 +1025,18 @@ void void_main(int argc, char* argv[]) {
}
}
- 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 e5204da5..61edd8f3 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 @@ namespace webrtc {
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 c90ba827..249b6682 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(keypress_file, "keypress.bool", "The name of the keypress file.");
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 @@ int do_main(int argc, char* argv[]) {
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 @@ while (ReadMessageFromFile(debug_file, &event_msg)) {
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 @@ while (ReadMessageFromFile(debug_file, &event_msg)) {
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 @@ while (ReadMessageFromFile(debug_file, &event_msg)) {
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 5a4d309d..00000000
--- 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_neon.target.darwin-arm.mk b/modules/audio_processing_neon.target.darwin-arm.mk
index e89efc7e..4b6e7ef3 100644
--- a/modules/audio_processing_neon.target.darwin-arm.mk
+++ b/modules/audio_processing_neon.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -37,7 +36,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -57,13 +55,13 @@ MY_CFLAGS_Debug := \
-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 \
@@ -78,6 +76,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -101,12 +100,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +150,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -165,7 +168,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -185,13 +187,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -229,12 +231,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +282,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -295,51 +301,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 e89efc7e..4b6e7ef3 100644
--- a/modules/audio_processing_neon.target.linux-arm.mk
+++ b/modules/audio_processing_neon.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -37,7 +36,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -57,13 +55,13 @@ MY_CFLAGS_Debug := \
-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 \
@@ -78,6 +76,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -101,12 +100,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +150,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -165,7 +168,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -185,13 +187,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -229,12 +231,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +282,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -295,51 +301,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 03776406..dc6ee54f 100644
--- a/modules/audio_processing_sse2.target.darwin-x86.mk
+++ b/modules/audio_processing_sse2.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +132,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,12 +206,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +250,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -262,46 +268,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 6aee082d..b267170f 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 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +131,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,12 +204,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -243,6 +248,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -260,46 +266,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 03776406..dc6ee54f 100644
--- a/modules/audio_processing_sse2.target.linux-x86.mk
+++ b/modules/audio_processing_sse2.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +132,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,12 +206,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +250,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -262,46 +268,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 6aee082d..b267170f 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 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +131,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,12 +204,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -243,6 +248,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -260,46 +266,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 c38ec555..7ce0aaf7 100644
--- a/modules/audioproc_debug_proto.target.darwin-arm.mk
+++ b/modules/audioproc_debug_proto.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -74,13 +72,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -118,12 +117,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +169,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -184,7 +187,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,13 +204,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -246,12 +248,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +301,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -314,50 +320,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 1895f8aa..40dd7e04 100644
--- a/modules/audioproc_debug_proto.target.darwin-arm64.mk
+++ b/modules/audioproc_debug_proto.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES :=
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -85,6 +83,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -107,12 +106,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +155,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -168,7 +171,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -220,12 +222,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +272,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -284,42 +290,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 a9348098..22bf6a39 100644
--- a/modules/audioproc_debug_proto.target.darwin-mips.mk
+++ b/modules/audioproc_debug_proto.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -75,8 +73,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -91,6 +87,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -114,12 +111,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +162,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -179,7 +180,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -198,8 +198,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -237,12 +235,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +287,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -304,46 +306,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/audioproc_debug_proto.target.darwin-x86.mk
index 561c43ca..1a42bc4b 100644
--- a/modules/audioproc_debug_proto.target.darwin-x86.mk
+++ b/modules/audioproc_debug_proto.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES :=
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -90,6 +88,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -113,12 +112,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +161,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -174,7 +177,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -232,12 +234,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +284,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -296,46 +302,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 d1428c4c..18be8f1b 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 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -89,6 +87,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -112,12 +111,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +160,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -174,7 +177,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -230,12 +232,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +282,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -294,46 +300,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 c38ec555..7ce0aaf7 100644
--- a/modules/audioproc_debug_proto.target.linux-arm.mk
+++ b/modules/audioproc_debug_proto.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -74,13 +72,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -118,12 +117,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +169,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -184,7 +187,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,13 +204,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -246,12 +248,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +301,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -314,50 +320,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 1895f8aa..40dd7e04 100644
--- a/modules/audioproc_debug_proto.target.linux-arm64.mk
+++ b/modules/audioproc_debug_proto.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES :=
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -85,6 +83,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -107,12 +106,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +155,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -168,7 +171,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -220,12 +222,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +272,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -284,42 +290,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 a9348098..22bf6a39 100644
--- a/modules/audioproc_debug_proto.target.linux-mips.mk
+++ b/modules/audioproc_debug_proto.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -75,8 +73,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -91,6 +87,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -114,12 +111,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +162,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -179,7 +180,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -198,8 +198,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -237,12 +235,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +287,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -304,46 +306,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/audioproc_debug_proto.target.linux-x86.mk
index 561c43ca..1a42bc4b 100644
--- a/modules/audioproc_debug_proto.target.linux-x86.mk
+++ b/modules/audioproc_debug_proto.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES :=
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -90,6 +88,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -113,12 +112,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +161,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -174,7 +177,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -232,12 +234,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +284,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -296,46 +302,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 d1428c4c..18be8f1b 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 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -89,6 +87,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -112,12 +111,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +160,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -174,7 +177,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -230,12 +232,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +282,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -294,46 +300,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 2b9364e8..eef70123 100644
--- a/modules/bitrate_controller.target.darwin-arm.mk
+++ b/modules/bitrate_controller.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -51,13 +49,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -95,12 +94,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +141,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -156,7 +159,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -174,13 +176,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -218,12 +220,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +268,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -281,50 +287,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 2cfb09f0..6e38358c 100644
--- a/modules/bitrate_controller.target.darwin-arm64.mk
+++ b/modules/bitrate_controller.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -62,6 +60,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -84,12 +83,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +127,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -140,7 +143,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -192,12 +194,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +239,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -251,42 +257,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 c573352b..abe78345 100644
--- a/modules/bitrate_controller.target.darwin-mips.mk
+++ b/modules/bitrate_controller.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -52,8 +50,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -68,6 +64,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -91,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +134,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -151,7 +152,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -170,8 +170,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -209,12 +207,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +254,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -271,46 +273,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/bitrate_controller.target.darwin-x86.mk
index 2398eda8..1dca02a3 100644
--- a/modules/bitrate_controller.target.darwin-x86.mk
+++ b/modules/bitrate_controller.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +133,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -146,7 +149,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,12 +206,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +251,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -263,46 +269,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 d3b9fd39..e1e69c3e 100644
--- a/modules/bitrate_controller.target.darwin-x86_64.mk
+++ b/modules/bitrate_controller.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +132,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -146,7 +149,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,12 +204,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +249,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -261,46 +267,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 2b9364e8..eef70123 100644
--- a/modules/bitrate_controller.target.linux-arm.mk
+++ b/modules/bitrate_controller.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -51,13 +49,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -95,12 +94,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +141,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -156,7 +159,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -174,13 +176,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -218,12 +220,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +268,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -281,50 +287,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 2cfb09f0..6e38358c 100644
--- a/modules/bitrate_controller.target.linux-arm64.mk
+++ b/modules/bitrate_controller.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -62,6 +60,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -84,12 +83,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +127,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -140,7 +143,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -192,12 +194,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +239,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -251,42 +257,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 c573352b..abe78345 100644
--- a/modules/bitrate_controller.target.linux-mips.mk
+++ b/modules/bitrate_controller.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -52,8 +50,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -68,6 +64,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -91,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +134,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -151,7 +152,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -170,8 +170,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -209,12 +207,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +254,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -271,46 +273,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/bitrate_controller.target.linux-x86.mk
index 2398eda8..1dca02a3 100644
--- a/modules/bitrate_controller.target.linux-x86.mk
+++ b/modules/bitrate_controller.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +133,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -146,7 +149,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,12 +206,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +251,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -263,46 +269,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 d3b9fd39..e1e69c3e 100644
--- a/modules/bitrate_controller.target.linux-x86_64.mk
+++ b/modules/bitrate_controller.target.linux-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +132,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -146,7 +149,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,12 +204,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +249,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -261,46 +267,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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
index c3ac28ce..d4d8f682 100644
--- a/modules/bitrate_controller/BUILD.gn
+++ b/modules/bitrate_controller/BUILD.gn
@@ -24,5 +24,11 @@ source_set("bitrate_controller") {
]
}
+ 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 9420ba2e..2aa9763e 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
diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn
index 55853fb0..10219b57 100644
--- a/modules/desktop_capture/BUILD.gn
+++ b/modules/desktop_capture/BUILD.gn
@@ -105,9 +105,18 @@ source_set("desktop_capture") {
]
}
- configs += [ "../../:common_inherited_config"]
+ direct_dependent_configs = [ "../..:common_inherited_config"]
- deps = ["../../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" ]
+ }
+
+ deps = [
+ "../../system_wrappers",
+ "../../base:webrtc_base",
+ ]
if (use_desktop_capture_differ_sse2) {
deps += [":desktop_capture_differ_sse2"]
@@ -118,12 +127,13 @@ 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"]
+ configs += [ "../..:common_inherited_config"]
if (is_posix && !is_mac) {
cflags = ["-msse2"]
diff --git a/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc b/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc
index b482a296..d2579a17 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 a0195d66..df6c4bcf 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",
diff --git a/modules/desktop_capture/desktop_region_unittest.cc b/modules/desktop_capture/desktop_region_unittest.cc
index 747e8c0a..3062f0b9 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/mouse_cursor_monitor_mac.mm b/modules/desktop_capture/mouse_cursor_monitor_mac.mm
index f33720d1..331ee80b 100644
--- a/modules/desktop_capture/mouse_cursor_monitor_mac.mm
+++ b/modules/desktop_capture/mouse_cursor_monitor_mac.mm
@@ -262,6 +262,7 @@ void MouseCursorMonitorMac::CaptureImage() {
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 c6af2b70..5a541d04 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 be05bd99..effe7ebf 100644
--- a/modules/desktop_capture/screen_capturer_mac.mm
+++ b/modules/desktop_capture/screen_capturer_mac.mm
@@ -429,6 +429,7 @@ void ScreenCapturerMac::Capture(const DesktopRegion& region_to_capture) {
// 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;
}
diff --git a/modules/desktop_capture/window_capturer_unittest.cc b/modules/desktop_capture/window_capturer_unittest.cc
index ad60a4bd..9ac7d18b 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 c6555de4..3cb10488 100644
--- a/modules/desktop_capture/window_capturer_win.cc
+++ b/modules/desktop_capture/window_capturer_win.cc
@@ -173,6 +173,17 @@ void WindowCapturerWin::Capture(const DesktopRegion& region) {
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)) {
diff --git a/modules/iLBC.target.darwin-arm.mk b/modules/iLBC.target.darwin-arm.mk
index cb0d8913..7508a299 100644
--- a/modules/iLBC.target.darwin-arm.mk
+++ b/modules/iLBC.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -117,13 +115,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -161,12 +160,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -209,6 +211,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -226,7 +229,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -244,13 +246,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -288,12 +290,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -337,6 +342,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -355,50 +361,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 3918e039..3ba95c52 100644
--- a/modules/iLBC.target.darwin-arm64.mk
+++ b/modules/iLBC.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -128,6 +126,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -150,12 +149,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -195,6 +197,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -210,7 +213,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -262,12 +264,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +313,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -325,42 +331,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 3e8581cb..b927c543 100644
--- a/modules/iLBC.target.darwin-mips.mk
+++ b/modules/iLBC.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -118,8 +116,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -134,6 +130,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -157,12 +154,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -204,6 +204,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -221,7 +222,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -240,8 +240,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -279,12 +277,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -327,6 +328,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -345,46 +347,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/iLBC.target.darwin-x86.mk
index 95821584..5a10dc0b 100644
--- a/modules/iLBC.target.darwin-x86.mk
+++ b/modules/iLBC.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -133,6 +131,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -156,12 +155,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +203,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -216,7 +219,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -274,12 +276,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -320,6 +325,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -337,46 +343,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 499f5d67..ec097521 100644
--- a/modules/iLBC.target.darwin-x86_64.mk
+++ b/modules/iLBC.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -132,6 +130,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -155,12 +154,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -200,6 +202,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -216,7 +219,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -272,12 +274,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -318,6 +323,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -335,46 +341,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 cb0d8913..7508a299 100644
--- a/modules/iLBC.target.linux-arm.mk
+++ b/modules/iLBC.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -117,13 +115,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -161,12 +160,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -209,6 +211,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -226,7 +229,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -244,13 +246,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -288,12 +290,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -337,6 +342,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -355,50 +361,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 3918e039..3ba95c52 100644
--- a/modules/iLBC.target.linux-arm64.mk
+++ b/modules/iLBC.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -128,6 +126,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -150,12 +149,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -195,6 +197,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -210,7 +213,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -262,12 +264,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +313,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -325,42 +331,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 3e8581cb..b927c543 100644
--- a/modules/iLBC.target.linux-mips.mk
+++ b/modules/iLBC.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -118,8 +116,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -134,6 +130,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -157,12 +154,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -204,6 +204,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -221,7 +222,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -240,8 +240,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -279,12 +277,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -327,6 +328,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -345,46 +347,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/iLBC.target.linux-x86.mk
index 95821584..5a10dc0b 100644
--- a/modules/iLBC.target.linux-x86.mk
+++ b/modules/iLBC.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -133,6 +131,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -156,12 +155,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +203,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -216,7 +219,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -274,12 +276,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -320,6 +325,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -337,46 +343,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 499f5d67..ec097521 100644
--- a/modules/iLBC.target.linux-x86_64.mk
+++ b/modules/iLBC.target.linux-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -132,6 +130,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -155,12 +154,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -200,6 +202,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -216,7 +219,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -272,12 +274,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -318,6 +323,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -335,46 +341,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 5dc31077..eaa66ed9 100644
--- a/modules/iSAC.target.darwin-arm.mk
+++ b/modules/iSAC.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -76,13 +74,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -120,12 +119,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +170,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -185,7 +188,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -203,13 +205,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -247,12 +249,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +301,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -314,50 +320,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 96a69a65..41b57b0b 100644
--- a/modules/iSAC.target.darwin-arm64.mk
+++ b/modules/iSAC.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -87,6 +85,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -109,12 +108,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +156,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -169,7 +172,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -221,12 +223,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +272,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -284,42 +290,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 adaab736..cea281ab 100644
--- a/modules/iSAC.target.darwin-mips.mk
+++ b/modules/iSAC.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -77,8 +75,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -93,6 +89,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -116,12 +113,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +163,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -180,7 +181,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -199,8 +199,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -238,12 +236,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +287,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -304,46 +306,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/iSAC.target.darwin-x86.mk
index e4d852ba..c0121cbf 100644
--- a/modules/iSAC.target.darwin-x86.mk
+++ b/modules/iSAC.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -92,6 +90,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -115,12 +114,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +162,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -175,7 +178,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -233,12 +235,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +284,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -296,46 +302,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 3dc750f5..08af5574 100644
--- a/modules/iSAC.target.darwin-x86_64.mk
+++ b/modules/iSAC.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -91,6 +89,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -114,12 +113,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +161,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -175,7 +178,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -231,12 +233,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +282,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -294,46 +300,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 5dc31077..eaa66ed9 100644
--- a/modules/iSAC.target.linux-arm.mk
+++ b/modules/iSAC.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -76,13 +74,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -120,12 +119,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +170,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -185,7 +188,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -203,13 +205,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -247,12 +249,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +301,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -314,50 +320,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 96a69a65..41b57b0b 100644
--- a/modules/iSAC.target.linux-arm64.mk
+++ b/modules/iSAC.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -87,6 +85,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -109,12 +108,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +156,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -169,7 +172,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -221,12 +223,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +272,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -284,42 +290,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 adaab736..cea281ab 100644
--- a/modules/iSAC.target.linux-mips.mk
+++ b/modules/iSAC.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -77,8 +75,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -93,6 +89,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -116,12 +113,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +163,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -180,7 +181,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -199,8 +199,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -238,12 +236,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +287,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -304,46 +306,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/iSAC.target.linux-x86.mk
index e4d852ba..c0121cbf 100644
--- a/modules/iSAC.target.linux-x86.mk
+++ b/modules/iSAC.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -92,6 +90,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -115,12 +114,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +162,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -175,7 +178,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -233,12 +235,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +284,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -296,46 +302,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 3dc750f5..08af5574 100644
--- a/modules/iSAC.target.linux-x86_64.mk
+++ b/modules/iSAC.target.linux-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -91,6 +89,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -114,12 +113,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +161,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -175,7 +178,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -231,12 +233,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +282,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -294,46 +300,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 e86dc139..27040660 100644
--- a/modules/iSACFix.target.darwin-arm.mk
+++ b/modules/iSACFix.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -58,7 +57,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -76,13 +74,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -120,12 +119,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +171,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -186,7 +189,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,13 +206,13 @@ MY_CFLAGS_Release := \
-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,12 +250,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -298,6 +303,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -316,50 +322,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 ed860a39..3a2a5283 100644
--- a/modules/iSACFix.target.darwin-arm64.mk
+++ b/modules/iSACFix.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -57,7 +56,6 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -87,6 +85,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -109,12 +108,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +157,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -170,7 +173,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -222,12 +224,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +274,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -286,42 +292,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 50ec3d96..1ab22e26 100644
--- a/modules/iSACFix.target.darwin-mips.mk
+++ b/modules/iSACFix.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -61,7 +60,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -80,8 +78,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -96,6 +92,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -119,12 +116,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +167,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -184,7 +185,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -203,8 +203,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -242,12 +240,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -291,6 +292,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -309,46 +311,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/iSACFix.target.darwin-x86.mk
index 8507a521..542cc27a 100644
--- a/modules/iSACFix.target.darwin-x86.mk
+++ b/modules/iSACFix.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -57,7 +56,6 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -92,6 +90,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -115,12 +114,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +163,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -176,7 +179,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -234,12 +236,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +286,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -298,46 +304,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 3c6561c8..1dab1a7e 100644
--- a/modules/iSACFix.target.darwin-x86_64.mk
+++ b/modules/iSACFix.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -58,7 +57,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -91,6 +89,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -114,12 +113,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +162,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -176,7 +179,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -232,12 +234,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +284,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -296,46 +302,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 e86dc139..27040660 100644
--- a/modules/iSACFix.target.linux-arm.mk
+++ b/modules/iSACFix.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -58,7 +57,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -76,13 +74,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -120,12 +119,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +171,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -186,7 +189,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,13 +206,13 @@ MY_CFLAGS_Release := \
-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,12 +250,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -298,6 +303,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -316,50 +322,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 ed860a39..3a2a5283 100644
--- a/modules/iSACFix.target.linux-arm64.mk
+++ b/modules/iSACFix.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -57,7 +56,6 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -87,6 +85,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -109,12 +108,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +157,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -170,7 +173,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -222,12 +224,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +274,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -286,42 +292,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 50ec3d96..1ab22e26 100644
--- a/modules/iSACFix.target.linux-mips.mk
+++ b/modules/iSACFix.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -61,7 +60,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -80,8 +78,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -96,6 +92,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -119,12 +116,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +167,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -184,7 +185,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -203,8 +203,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -242,12 +240,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -291,6 +292,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -309,46 +311,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/iSACFix.target.linux-x86.mk
index 8507a521..542cc27a 100644
--- a/modules/iSACFix.target.linux-x86.mk
+++ b/modules/iSACFix.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -57,7 +56,6 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -92,6 +90,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -115,12 +114,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +163,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -176,7 +179,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -234,12 +236,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +286,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -298,46 +304,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 3c6561c8..1dab1a7e 100644
--- a/modules/iSACFix.target.linux-x86_64.mk
+++ b/modules/iSACFix.target.linux-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -58,7 +57,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -91,6 +89,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -114,12 +113,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +162,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -176,7 +179,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -232,12 +234,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +284,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -296,46 +302,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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_neon.target.darwin-arm.mk b/modules/isac_neon.target.darwin-arm.mk
index 5c4ba969..af09117b 100644
--- a/modules/isac_neon.target.darwin-arm.mk
+++ b/modules/isac_neon.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -56,13 +54,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -100,12 +99,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +149,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -164,7 +167,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -184,13 +186,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -228,12 +230,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -276,6 +281,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -294,50 +300,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 5c4ba969..af09117b 100644
--- a/modules/isac_neon.target.linux-arm.mk
+++ b/modules/isac_neon.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -56,13 +54,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -100,12 +99,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +149,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -164,7 +167,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -184,13 +186,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -228,12 +230,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -276,6 +281,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -294,50 +300,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 4afc98ea..a17bdcbd 100644
--- a/modules/media_file.target.darwin-arm.mk
+++ b/modules/media_file.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -52,13 +50,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -96,12 +95,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +144,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -159,7 +162,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -177,13 +179,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -221,12 +223,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +273,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -286,50 +292,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 0cadf480..41f0f92c 100644
--- a/modules/media_file.target.darwin-arm64.mk
+++ b/modules/media_file.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -63,6 +61,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -85,12 +84,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +130,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -143,7 +146,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -195,12 +197,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +244,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -256,42 +262,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 8d8da770..a6e9af2e 100644
--- a/modules/media_file.target.darwin-mips.mk
+++ b/modules/media_file.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -53,8 +51,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -69,6 +65,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -92,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +137,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -154,7 +155,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,8 +173,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -212,12 +210,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +259,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -276,46 +278,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/media_file.target.darwin-x86.mk
index 1006d6e9..060f8a6c 100644
--- a/modules/media_file.target.darwin-x86.mk
+++ b/modules/media_file.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -68,6 +66,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -91,12 +90,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +136,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -149,7 +152,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -207,12 +209,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +256,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -268,46 +274,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 0ef1e146..d496c765 100644
--- a/modules/media_file.target.darwin-x86_64.mk
+++ b/modules/media_file.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +135,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -149,7 +152,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -205,12 +207,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +254,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -266,46 +272,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 4afc98ea..a17bdcbd 100644
--- a/modules/media_file.target.linux-arm.mk
+++ b/modules/media_file.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -52,13 +50,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -96,12 +95,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +144,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -159,7 +162,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -177,13 +179,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -221,12 +223,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +273,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -286,50 +292,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 0cadf480..41f0f92c 100644
--- a/modules/media_file.target.linux-arm64.mk
+++ b/modules/media_file.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -63,6 +61,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -85,12 +84,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +130,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -143,7 +146,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -195,12 +197,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +244,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -256,42 +262,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 8d8da770..a6e9af2e 100644
--- a/modules/media_file.target.linux-mips.mk
+++ b/modules/media_file.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -53,8 +51,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -69,6 +65,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -92,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +137,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -154,7 +155,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,8 +173,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -212,12 +210,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +259,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -276,46 +278,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/media_file.target.linux-x86.mk
index 1006d6e9..060f8a6c 100644
--- a/modules/media_file.target.linux-x86.mk
+++ b/modules/media_file.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -68,6 +66,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -91,12 +90,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +136,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -149,7 +152,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -207,12 +209,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +256,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -268,46 +274,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 0ef1e146..d496c765 100644
--- a/modules/media_file.target.linux-x86_64.mk
+++ b/modules/media_file.target.linux-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +135,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -149,7 +152,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -205,12 +207,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +254,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -266,46 +272,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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
index 971a6fa2..6f49dcd9 100644
--- a/modules/media_file/BUILD.gn
+++ b/modules/media_file/BUILD.gn
@@ -9,7 +9,7 @@
import("../../build/webrtc.gni")
config("internal_config") {
- visibility = ":*" # Only targets in this file can depend on this.
+ visibility = [ ":*" ] # Only targets in this file can depend on this.
include_dirs = [
"interface",
"../interface",
@@ -35,6 +35,12 @@ source_set("media_file") {
]
}
+ 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 3387ee9e..beb9729e 100644
--- a/modules/media_file/OWNERS
+++ b/modules/media_file/OWNERS
@@ -1,4 +1,3 @@
-pwestin@webrtc.org
mflodman@webrtc.org
perkj@webrtc.org
niklas.enbom@webrtc.org
diff --git a/modules/media_file/interface/media_file.h b/modules/media_file/interface/media_file.h
index f2ec1037..5413b442 100644
--- a/modules/media_file/interface/media_file.h
+++ b/modules/media_file/interface/media_file.h
@@ -27,7 +27,7 @@ public:
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 2c408c81..00000000
--- 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 1a19e710..eaec128b 100644
--- a/modules/media_file/source/media_file_impl.h
+++ b/modules/media_file/source/media_file_impl.h
@@ -26,16 +26,18 @@ public:
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 @@ public:
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/modules.gyp b/modules/modules.gyp
index f68ea7cb..9650e66d 100644
--- a/modules/modules.gyp
+++ b/modules/modules.gyp
@@ -104,7 +104,9 @@
'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',
@@ -150,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',
@@ -215,7 +219,6 @@
'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',
@@ -234,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',
@@ -244,6 +248,7 @@
'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/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',
@@ -294,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',
],
@@ -329,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',
@@ -355,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',
],
@@ -366,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 c36b574f..63cb6a8e 100644
--- a/modules/neteq.target.darwin-arm.mk
+++ b/modules/neteq.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -82,13 +80,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -126,12 +125,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -185,6 +187,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -202,7 +205,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -220,13 +222,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -264,12 +266,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +329,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -342,50 +348,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 fc6eff43..59644df7 100644
--- a/modules/neteq.target.darwin-arm64.mk
+++ b/modules/neteq.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -93,6 +91,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -115,12 +114,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -171,6 +173,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -186,7 +189,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -238,12 +240,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +300,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -312,42 +318,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 a49ee1c4..49856e7a 100644
--- a/modules/neteq.target.darwin-mips.mk
+++ b/modules/neteq.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -83,8 +81,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -99,6 +95,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -122,12 +119,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -180,6 +180,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -197,7 +198,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -216,8 +216,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -255,12 +253,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -314,6 +315,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -332,46 +334,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/neteq.target.darwin-x86.mk
index 910f8844..7a4e6caa 100644
--- a/modules/neteq.target.darwin-x86.mk
+++ b/modules/neteq.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -98,6 +96,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -121,12 +120,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +179,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -192,7 +195,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -250,12 +252,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +312,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -324,46 +330,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 a6e5de48..585d6e4d 100644
--- a/modules/neteq.target.darwin-x86_64.mk
+++ b/modules/neteq.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -97,6 +95,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -120,12 +119,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -176,6 +178,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -192,7 +195,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -248,12 +250,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +310,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -322,46 +328,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 c36b574f..63cb6a8e 100644
--- a/modules/neteq.target.linux-arm.mk
+++ b/modules/neteq.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -82,13 +80,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -126,12 +125,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -185,6 +187,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -202,7 +205,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -220,13 +222,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -264,12 +266,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +329,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -342,50 +348,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 fc6eff43..59644df7 100644
--- a/modules/neteq.target.linux-arm64.mk
+++ b/modules/neteq.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -93,6 +91,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -115,12 +114,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -171,6 +173,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -186,7 +189,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -238,12 +240,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +300,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -312,42 +318,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 a49ee1c4..49856e7a 100644
--- a/modules/neteq.target.linux-mips.mk
+++ b/modules/neteq.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -83,8 +81,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -99,6 +95,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -122,12 +119,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -180,6 +180,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -197,7 +198,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -216,8 +216,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -255,12 +253,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -314,6 +315,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -332,46 +334,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/neteq.target.linux-x86.mk
index 910f8844..7a4e6caa 100644
--- a/modules/neteq.target.linux-x86.mk
+++ b/modules/neteq.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -98,6 +96,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -121,12 +120,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +179,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -192,7 +195,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -250,12 +252,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +312,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -324,46 +330,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 a6e5de48..585d6e4d 100644
--- a/modules/neteq.target.linux-x86_64.mk
+++ b/modules/neteq.target.linux-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -97,6 +95,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -120,12 +119,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -176,6 +178,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -192,7 +195,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -248,12 +250,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +310,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -322,46 +328,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 b89afe3f..361a1af0 100644
--- a/modules/paced_sender.target.darwin-arm.mk
+++ b/modules/paced_sender.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -94,12 +93,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -138,6 +140,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -155,7 +158,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,13 +175,13 @@ MY_CFLAGS_Release := \
-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,12 +219,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +267,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -280,50 +286,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 fb68159e..41cdf334 100644
--- a/modules/paced_sender.target.darwin-arm64.mk
+++ b/modules/paced_sender.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,6 +59,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -83,12 +82,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +126,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -139,7 +142,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -191,12 +193,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +238,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -250,42 +256,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 d1a70fd1..025895dc 100644
--- a/modules/paced_sender.target.darwin-mips.mk
+++ b/modules/paced_sender.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -51,8 +49,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -67,6 +63,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +133,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +151,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -169,8 +169,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -208,12 +206,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +253,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -270,46 +272,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/paced_sender.target.darwin-x86.mk
index 4ed55c1b..591110f7 100644
--- a/modules/paced_sender.target.darwin-x86.mk
+++ b/modules/paced_sender.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +132,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -203,12 +205,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +250,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -262,46 +268,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 1eccafe6..43c117e7 100644
--- a/modules/paced_sender.target.darwin-x86_64.mk
+++ b/modules/paced_sender.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -88,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +131,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -201,12 +203,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -243,6 +248,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -260,46 +266,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 b89afe3f..361a1af0 100644
--- a/modules/paced_sender.target.linux-arm.mk
+++ b/modules/paced_sender.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -94,12 +93,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -138,6 +140,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -155,7 +158,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,13 +175,13 @@ MY_CFLAGS_Release := \
-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,12 +219,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +267,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -280,50 +286,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 fb68159e..41cdf334 100644
--- a/modules/paced_sender.target.linux-arm64.mk
+++ b/modules/paced_sender.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,6 +59,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -83,12 +82,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +126,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -139,7 +142,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -191,12 +193,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +238,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -250,42 +256,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 d1a70fd1..025895dc 100644
--- a/modules/paced_sender.target.linux-mips.mk
+++ b/modules/paced_sender.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -51,8 +49,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -67,6 +63,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +133,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +151,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -169,8 +169,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -208,12 +206,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +253,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -270,46 +272,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/paced_sender.target.linux-x86.mk
index 4ed55c1b..591110f7 100644
--- a/modules/paced_sender.target.linux-x86.mk
+++ b/modules/paced_sender.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +132,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -203,12 +205,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +250,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -262,46 +268,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 1eccafe6..43c117e7 100644
--- a/modules/paced_sender.target.linux-x86_64.mk
+++ b/modules/paced_sender.target.linux-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -88,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +131,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -201,12 +203,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -243,6 +248,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -260,46 +266,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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
index d3eceb35..7c451d65 100644
--- a/modules/pacing/BUILD.gn
+++ b/modules/pacing/BUILD.gn
@@ -12,5 +12,11 @@ source_set("pacing") {
"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 4486a81e..bde04e2c 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
diff --git a/modules/pacing/include/paced_sender.h b/modules/pacing/include/paced_sender.h
index ddd8e53b..14a3a3d4 100644
--- a/modules/pacing/include/paced_sender.h
+++ b/modules/pacing/include/paced_sender.h
@@ -14,9 +14,9 @@
#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/thread_annotations.h"
#include "webrtc/typedefs.h"
namespace webrtc {
diff --git a/modules/remote_bitrate_estimator.target.darwin-arm.mk b/modules/remote_bitrate_estimator.target.darwin-arm.mk
index fa7195ee..f6eb2e0d 100644
--- a/modules/remote_bitrate_estimator.target.darwin-arm.mk
+++ b/modules/remote_bitrate_estimator.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -94,12 +93,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -138,6 +140,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -155,7 +158,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,13 +175,13 @@ MY_CFLAGS_Release := \
-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,12 +219,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +267,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -280,50 +286,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 99ad45a9..430b726f 100644
--- a/modules/remote_bitrate_estimator.target.darwin-arm64.mk
+++ b/modules/remote_bitrate_estimator.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,6 +59,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -83,12 +82,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +126,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -139,7 +142,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -191,12 +193,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +238,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -250,42 +256,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 c0df6a99..6ad1e354 100644
--- a/modules/remote_bitrate_estimator.target.darwin-mips.mk
+++ b/modules/remote_bitrate_estimator.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -51,8 +49,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -67,6 +63,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +133,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +151,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -169,8 +169,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -208,12 +206,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +253,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -270,46 +272,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/remote_bitrate_estimator.target.darwin-x86.mk
index e853711a..accd9728 100644
--- a/modules/remote_bitrate_estimator.target.darwin-x86.mk
+++ b/modules/remote_bitrate_estimator.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +132,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -203,12 +205,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +250,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -262,46 +268,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 0ae0ad36..745a1089 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 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -88,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +131,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -201,12 +203,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -243,6 +248,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -260,46 +266,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 fa7195ee..f6eb2e0d 100644
--- a/modules/remote_bitrate_estimator.target.linux-arm.mk
+++ b/modules/remote_bitrate_estimator.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -94,12 +93,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -138,6 +140,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -155,7 +158,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,13 +175,13 @@ MY_CFLAGS_Release := \
-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,12 +219,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +267,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -280,50 +286,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 99ad45a9..430b726f 100644
--- a/modules/remote_bitrate_estimator.target.linux-arm64.mk
+++ b/modules/remote_bitrate_estimator.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,6 +59,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -83,12 +82,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +126,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -139,7 +142,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -191,12 +193,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +238,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -250,42 +256,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 c0df6a99..6ad1e354 100644
--- a/modules/remote_bitrate_estimator.target.linux-mips.mk
+++ b/modules/remote_bitrate_estimator.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -51,8 +49,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -67,6 +63,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +133,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +151,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -169,8 +169,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -208,12 +206,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +253,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -270,46 +272,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/remote_bitrate_estimator.target.linux-x86.mk
index e853711a..accd9728 100644
--- a/modules/remote_bitrate_estimator.target.linux-x86.mk
+++ b/modules/remote_bitrate_estimator.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +132,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -203,12 +205,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +250,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -262,46 +268,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 0ae0ad36..745a1089 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 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -88,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +131,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -201,12 +203,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -243,6 +248,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -260,46 +266,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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
index cc643dad..36af77ed 100644
--- a/modules/remote_bitrate_estimator/BUILD.gn
+++ b/modules/remote_bitrate_estimator/BUILD.gn
@@ -16,4 +16,10 @@ source_set("remote_bitrate_estimator") {
]
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 49d19429..fd12dcea 100644
--- a/modules/remote_bitrate_estimator/OWNERS
+++ b/modules/remote_bitrate_estimator/OWNERS
@@ -1,4 +1,3 @@
-pwestin@webrtc.org
stefan@webrtc.org
henrik.lundin@webrtc.org
mflodman@webrtc.org
diff --git a/modules/remote_bitrate_estimator/bwe_simulations.cc b/modules/remote_bitrate_estimator/bwe_simulations.cc
index 47390f78..142de871 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"
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 76e91e26..e031d4df 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -48,13 +46,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -92,12 +91,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +137,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -152,7 +155,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -166,13 +168,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -210,12 +212,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +259,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -272,50 +278,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 300f100b..00da75a3 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -59,6 +57,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -81,12 +80,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -121,6 +123,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -136,7 +139,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -184,12 +186,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -225,6 +230,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -242,42 +248,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 d51611ac..d0d3e7ec 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -48,8 +46,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -64,6 +60,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -87,12 +84,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +129,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -146,7 +147,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -160,8 +160,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -199,12 +197,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +243,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -260,46 +262,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/remote_bitrate_estimator/rbe_components.target.darwin-x86.mk
index c9c74fb1..d74760e1 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -64,6 +62,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -87,12 +86,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +129,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -142,7 +145,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -196,12 +198,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +242,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -254,46 +260,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 3cea96d9..047d67e8 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -63,6 +61,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -86,12 +85,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +128,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -142,7 +145,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -194,12 +196,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +240,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -252,46 +258,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 76e91e26..e031d4df 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -48,13 +46,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -92,12 +91,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +137,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -152,7 +155,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -166,13 +168,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -210,12 +212,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +259,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -272,50 +278,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 300f100b..00da75a3 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -59,6 +57,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -81,12 +80,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -121,6 +123,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -136,7 +139,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -184,12 +186,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -225,6 +230,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -242,42 +248,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 d51611ac..d0d3e7ec 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -48,8 +46,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -64,6 +60,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -87,12 +84,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +129,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -146,7 +147,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -160,8 +160,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -199,12 +197,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +243,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -260,46 +262,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/remote_bitrate_estimator/rbe_components.target.linux-x86.mk
index c9c74fb1..d74760e1 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -64,6 +62,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -87,12 +86,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +129,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -142,7 +145,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -196,12 +198,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +242,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -254,46 +260,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 3cea96d9..047d67e8 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -63,6 +61,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -86,12 +85,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +128,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -142,7 +145,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -194,12 +196,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +240,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -252,46 +258,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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/test/bwe_test.h b/modules/remote_bitrate_estimator/test/bwe_test.h
index 49590653..d02e0645 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_unittest.cc b/modules/remote_bitrate_estimator/test/bwe_test_framework_unittest.cc
index 6e735785..51c1dc21 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"
diff --git a/modules/rtp_rtcp.target.darwin-arm.mk b/modules/rtp_rtcp.target.darwin-arm.mk
index 6db3d967..9698ce1a 100644
--- a/modules/rtp_rtcp.target.darwin-arm.mk
+++ b/modules/rtp_rtcp.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -55,6 +54,7 @@ LOCAL_SRC_FILES := \
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
@@ -63,7 +63,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -81,13 +80,13 @@ MY_CFLAGS_Debug := \
-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 \
@@ -102,6 +101,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -125,12 +125,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +172,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -186,7 +190,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,13 +207,13 @@ MY_CFLAGS_Release := \
-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,12 +251,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +299,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -311,50 +318,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 598b56b4..7b01e1fa 100644
--- a/modules/rtp_rtcp.target.darwin-arm64.mk
+++ b/modules/rtp_rtcp.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -55,6 +54,7 @@ LOCAL_SRC_FILES := \
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
@@ -62,7 +62,6 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -92,6 +91,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -114,12 +114,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +158,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -170,7 +174,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -222,12 +225,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +270,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -281,42 +288,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 8bb4b21c..4e4e5c5f 100644
--- a/modules/rtp_rtcp.target.darwin-mips.mk
+++ b/modules/rtp_rtcp.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -55,6 +54,7 @@ LOCAL_SRC_FILES := \
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
@@ -63,7 +63,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -82,8 +81,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -98,6 +95,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -121,12 +119,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -164,6 +165,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -181,7 +183,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -200,8 +201,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -239,12 +238,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +285,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -301,46 +304,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/rtp_rtcp.target.darwin-x86.mk
index b71127ec..8c145c81 100644
--- a/modules/rtp_rtcp.target.darwin-x86.mk
+++ b/modules/rtp_rtcp.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -55,6 +54,7 @@ LOCAL_SRC_FILES := \
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
@@ -62,7 +62,6 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -97,6 +96,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -120,12 +120,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +164,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -176,7 +180,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -234,12 +237,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -276,6 +282,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -293,46 +300,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 b9265bbb..031cab3d 100644
--- a/modules/rtp_rtcp.target.darwin-x86_64.mk
+++ b/modules/rtp_rtcp.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -55,6 +54,7 @@ LOCAL_SRC_FILES := \
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
@@ -63,7 +63,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -96,6 +95,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -119,12 +119,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +163,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -176,7 +180,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -232,12 +235,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +280,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -291,46 +298,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 6db3d967..9698ce1a 100644
--- a/modules/rtp_rtcp.target.linux-arm.mk
+++ b/modules/rtp_rtcp.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -55,6 +54,7 @@ LOCAL_SRC_FILES := \
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
@@ -63,7 +63,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -81,13 +80,13 @@ MY_CFLAGS_Debug := \
-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 \
@@ -102,6 +101,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -125,12 +125,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +172,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -186,7 +190,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,13 +207,13 @@ MY_CFLAGS_Release := \
-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,12 +251,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +299,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -311,50 +318,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 598b56b4..7b01e1fa 100644
--- a/modules/rtp_rtcp.target.linux-arm64.mk
+++ b/modules/rtp_rtcp.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -55,6 +54,7 @@ LOCAL_SRC_FILES := \
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
@@ -62,7 +62,6 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -92,6 +91,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -114,12 +114,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +158,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -170,7 +174,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -222,12 +225,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +270,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -281,42 +288,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 8bb4b21c..4e4e5c5f 100644
--- a/modules/rtp_rtcp.target.linux-mips.mk
+++ b/modules/rtp_rtcp.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -55,6 +54,7 @@ LOCAL_SRC_FILES := \
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
@@ -63,7 +63,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -82,8 +81,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -98,6 +95,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -121,12 +119,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -164,6 +165,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -181,7 +183,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -200,8 +201,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -239,12 +238,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +285,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -301,46 +304,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/rtp_rtcp.target.linux-x86.mk
index b71127ec..8c145c81 100644
--- a/modules/rtp_rtcp.target.linux-x86.mk
+++ b/modules/rtp_rtcp.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -55,6 +54,7 @@ LOCAL_SRC_FILES := \
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
@@ -62,7 +62,6 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -97,6 +96,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -120,12 +120,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +164,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -176,7 +180,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -234,12 +237,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -276,6 +282,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -293,46 +300,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 b9265bbb..031cab3d 100644
--- a/modules/rtp_rtcp.target.linux-x86_64.mk
+++ b/modules/rtp_rtcp.target.linux-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -55,6 +54,7 @@ LOCAL_SRC_FILES := \
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
@@ -63,7 +63,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -96,6 +95,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -119,12 +119,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +163,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -176,7 +180,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -232,12 +235,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +280,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -291,46 +298,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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
index 09fa3aca..2ee1a8f0 100644
--- a/modules/rtp_rtcp/BUILD.gn
+++ b/modules/rtp_rtcp/BUILD.gn
@@ -85,6 +85,7 @@ source_set("rtp_rtcp") {
"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",
@@ -93,6 +94,12 @@ source_set("rtp_rtcp") {
"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",
diff --git a/modules/rtp_rtcp/OWNERS b/modules/rtp_rtcp/OWNERS
index cafe4c19..2b08b6b2 100644
--- a/modules/rtp_rtcp/OWNERS
+++ b/modules/rtp_rtcp/OWNERS
@@ -1,4 +1,3 @@
-pwestin@webrtc.org
stefan@webrtc.org
henrik.lundin@webrtc.org
mflodman@webrtc.org
diff --git a/modules/rtp_rtcp/interface/rtp_rtcp_defines.h b/modules/rtp_rtcp/interface/rtp_rtcp_defines.h
index 99808439..2d6b272a 100644
--- a/modules/rtp_rtcp/interface/rtp_rtcp_defines.h
+++ b/modules/rtp_rtcp/interface/rtp_rtcp_defines.h
@@ -63,6 +63,11 @@ enum RTPAliveType
kRtpAlive = 2
};
+enum ProtectionType {
+ kUnprotectedPacket,
+ kProtectedPacket
+};
+
enum StorageType {
kDontStore,
kDontRetransmit,
@@ -355,7 +360,7 @@ class NullRtpData : public RtpData {
}
virtual bool OnRecoveredPacket(const uint8_t* packet,
- int packet_length) {
+ int packet_length) OVERRIDE {
return true;
}
};
diff --git a/modules/rtp_rtcp/source/Android.mk b/modules/rtp_rtcp/source/Android.mk
deleted file mode 100644
index 68295be7..00000000
--- 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/nack_rtx_unittest.cc b/modules/rtp_rtcp/source/nack_rtx_unittest.cc
index 209af40b..b30791c6 100644
--- a/modules/rtp_rtcp/source/nack_rtx_unittest.cc
+++ b/modules/rtp_rtcp/source/nack_rtx_unittest.cc
@@ -112,7 +112,10 @@ class RtxLoopBackTransport : public webrtc::Transport {
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/receive_statistics_impl.cc b/modules/rtp_rtcp/source/receive_statistics_impl.cc
index e3bc95f7..f063ce38 100644
--- a/modules/rtp_rtcp/source/receive_statistics_impl.cc
+++ b/modules/rtp_rtcp/source/receive_statistics_impl.cc
@@ -408,36 +408,31 @@ ReceiveStatisticsImpl::~ReceiveStatisticsImpl() {
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 4aa41f34..40ca2857 100644
--- a/modules/rtp_rtcp/source/receive_statistics_impl.h
+++ b/modules/rtp_rtcp/source/receive_statistics_impl.h
@@ -114,8 +114,6 @@ class ReceiveStatisticsImpl : public ReceiveStatistics,
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 f0b9dedd..5b4d0ddd 100644
--- a/modules/rtp_rtcp/source/receive_statistics_unittest.cc
+++ b/modules/rtp_rtcp/source/receive_statistics_unittest.cc
@@ -219,41 +219,42 @@ TEST_F(ReceiveStatisticsTest, RtcpCallbacks) {
EXPECT_EQ(1u, callback.num_calls_);
}
-TEST_F(ReceiveStatisticsTest, RtpCallbacks) {
- class TestCallback : public StreamDataCountersCallback {
- public:
- TestCallback()
- : StreamDataCountersCallback(), num_calls_(0), ssrc_(0), stats_() {}
- virtual ~TestCallback() {}
+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_;
- }
+ 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);
- }
+ 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;
+ uint32_t num_calls_;
+ uint32_t ssrc_;
+ StreamDataCounters stats_;
+};
+TEST_F(ReceiveStatisticsTest, RtpCallbacks) {
+ RtpTestCallback callback;
receive_statistics_->RegisterRtpStatisticsCallback(&callback);
const uint32_t kHeaderLength = 20;
@@ -300,4 +301,23 @@ TEST_F(ReceiveStatisticsTest, RtpCallbacks) {
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_receiver_unittest.cc b/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc
index 84438940..6ae89544 100644
--- a/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc
@@ -111,6 +111,8 @@ class RtcpReceiverTest : public ::testing::Test {
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 =
@@ -159,6 +161,263 @@ TEST_F(RtcpReceiverTest, InjectSrPacket) {
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) {
rtcp::Xr xr;
xr.From(0x2345);
@@ -446,58 +705,6 @@ TEST_F(RtcpReceiverTest, TmmbrReceivedWithNoIncomingPacket) {
EXPECT_EQ(-1, rtcp_receiver_->TMMBRReceived(0, 0, NULL));
}
-TEST_F(RtcpReceiverTest, TwoReportBlocks) {
- 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, TmmbrPacketAccepted) {
const uint32_t kMediaFlowSsrc = 0x2040608;
const uint32_t kSenderSsrc = 0x10203;
diff --git a/modules/rtp_rtcp/source/rtcp_sender.h b/modules/rtp_rtcp/source/rtcp_sender.h
index 26c44b04..c0b8ebdb 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"
@@ -23,7 +24,6 @@
#include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
#include "webrtc/modules/rtp_rtcp/source/tmmbr_help.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
-#include "webrtc/system_wrappers/interface/thread_annotations.h"
#include "webrtc/typedefs.h"
namespace webrtc {
diff --git a/modules/rtp_rtcp/source/rtp_format.cc b/modules/rtp_rtcp/source/rtp_format.cc
index da1f2df2..afb6c06d 100644
--- a/modules/rtp_rtcp/source/rtp_format.cc
+++ b/modules/rtp_rtcp/source/rtp_format.cc
@@ -11,16 +11,23 @@
#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) {
+ size_t max_payload_len,
+ const RTPVideoTypeHeader* rtp_type_header,
+ FrameType frame_type) {
switch (type) {
case kRtpVideoH264:
- return new RtpPacketizerH264(max_payload_len);
- case kRtpVideoNone:
- case kRtpVideoGeneric:
+ 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;
@@ -31,9 +38,11 @@ RtpDepacketizer* RtpDepacketizer::Create(RtpVideoCodecTypes type,
switch (type) {
case kRtpVideoH264:
return new RtpDepacketizerH264(callback);
- case kRtpVideoNone:
- case kRtpVideoGeneric:
case kRtpVideoVp8:
+ return new RtpDepacketizerVp8(callback);
+ case kRtpVideoGeneric:
+ return new RtpDepacketizerGeneric(callback);
+ case kRtpVideoNone:
assert(false);
}
return NULL;
diff --git a/modules/rtp_rtcp/source/rtp_format.h b/modules/rtp_rtcp/source/rtp_format.h
index d7dba480..07dc225c 100644
--- a/modules/rtp_rtcp/source/rtp_format.h
+++ b/modules/rtp_rtcp/source/rtp_format.h
@@ -11,6 +11,8 @@
#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"
@@ -19,7 +21,10 @@ namespace webrtc {
class RtpPacketizer {
public:
- static RtpPacketizer* Create(RtpVideoCodecTypes type, size_t max_payload_len);
+ static RtpPacketizer* Create(RtpVideoCodecTypes type,
+ size_t max_payload_len,
+ const RTPVideoTypeHeader* rtp_type_header,
+ FrameType frame_type);
virtual ~RtpPacketizer() {}
@@ -37,6 +42,12 @@ class RtpPacketizer {
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 {
diff --git a/modules/rtp_rtcp/source/rtp_format_h264.cc b/modules/rtp_rtcp/source/rtp_format_h264.cc
index 85bd9468..6b25f9c4 100644
--- a/modules/rtp_rtcp/source/rtp_format_h264.cc
+++ b/modules/rtp_rtcp/source/rtp_format_h264.cc
@@ -94,8 +94,12 @@ void ParseFuaNalu(WebRtcRTPHeader* rtp_header,
}
} // namespace
-RtpPacketizerH264::RtpPacketizerH264(size_t max_payload_len)
- : payload_data_(NULL), payload_size_(0), max_payload_len_(max_payload_len) {
+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() {
@@ -272,6 +276,20 @@ void RtpPacketizerH264::NextFragmentPacket(uint8_t* buffer,
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) {
}
diff --git a/modules/rtp_rtcp/source/rtp_format_h264.h b/modules/rtp_rtcp/source/rtp_format_h264.h
index 773fa18f..830d765c 100644
--- a/modules/rtp_rtcp/source/rtp_format_h264.h
+++ b/modules/rtp_rtcp/source/rtp_format_h264.h
@@ -21,7 +21,7 @@ class RtpPacketizerH264 : public RtpPacketizer {
public:
// Initialize with payload from encoder.
// The payload_data must be exactly one encoded H264 frame.
- explicit RtpPacketizerH264(size_t max_payload_len);
+ RtpPacketizerH264(FrameType frame_type, size_t max_payload_len);
virtual ~RtpPacketizerH264();
@@ -41,6 +41,12 @@ class RtpPacketizerH264 : public RtpPacketizer {
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,
@@ -78,6 +84,7 @@ class RtpPacketizerH264 : public RtpPacketizer {
const size_t max_payload_len_;
RTPFragmentationHeader fragmentation_;
PacketQueue packets_;
+ FrameType frame_type_;
DISALLOW_COPY_AND_ASSIGN(RtpPacketizerH264);
};
diff --git a/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc b/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc
index 55b9712b..fc30a062 100644
--- a/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc
@@ -88,8 +88,8 @@ void TestFua(size_t frame_size,
fragmentation.VerifyAndAllocateFragmentationHeader(1);
fragmentation.fragmentationOffset[0] = 0;
fragmentation.fragmentationLength[0] = frame_size;
- scoped_ptr<RtpPacketizer> packetizer(
- RtpPacketizer::Create(kRtpVideoH264, max_payload_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]);
@@ -163,7 +163,7 @@ TEST(RtpPacketizerH264Test, TestSingleNalu) {
fragmentation.fragmentationOffset[0] = 0;
fragmentation.fragmentationLength[0] = sizeof(frame);
scoped_ptr<RtpPacketizer> packetizer(
- RtpPacketizer::Create(kRtpVideoH264, kMaxPayloadSize));
+ RtpPacketizer::Create(kRtpVideoH264, kMaxPayloadSize, NULL, kFrameEmpty));
packetizer->SetPayloadData(frame, sizeof(frame), &fragmentation);
uint8_t packet[kMaxPayloadSize] = {0};
size_t length = 0;
@@ -192,7 +192,7 @@ TEST(RtpPacketizerH264Test, TestSingleNaluTwoPackets) {
frame[fragmentation.fragmentationOffset[1]] = 0x01;
scoped_ptr<RtpPacketizer> packetizer(
- RtpPacketizer::Create(kRtpVideoH264, kMaxPayloadSize));
+ RtpPacketizer::Create(kRtpVideoH264, kMaxPayloadSize, NULL, kFrameEmpty));
packetizer->SetPayloadData(frame, kFrameSize, &fragmentation);
uint8_t packet[kMaxPayloadSize] = {0};
@@ -229,7 +229,7 @@ TEST(RtpPacketizerH264Test, TestStapA) {
fragmentation.fragmentationLength[2] =
kNalHeaderSize + kFrameSize - kPayloadOffset;
scoped_ptr<RtpPacketizer> packetizer(
- RtpPacketizer::Create(kRtpVideoH264, kMaxPayloadSize));
+ RtpPacketizer::Create(kRtpVideoH264, kMaxPayloadSize, NULL, kFrameEmpty));
packetizer->SetPayloadData(frame, kFrameSize, &fragmentation);
uint8_t packet[kMaxPayloadSize] = {0};
@@ -264,7 +264,7 @@ TEST(RtpPacketizerH264Test, TestTooSmallForStapAHeaders) {
fragmentation.fragmentationLength[2] =
kNalHeaderSize + kFrameSize - kPayloadOffset;
scoped_ptr<RtpPacketizer> packetizer(
- RtpPacketizer::Create(kRtpVideoH264, kMaxPayloadSize));
+ RtpPacketizer::Create(kRtpVideoH264, kMaxPayloadSize, NULL, kFrameEmpty));
packetizer->SetPayloadData(frame, kFrameSize, &fragmentation);
uint8_t packet[kMaxPayloadSize] = {0};
@@ -312,7 +312,7 @@ TEST(RtpPacketizerH264Test, TestMixedStapA_FUA) {
}
}
scoped_ptr<RtpPacketizer> packetizer(
- RtpPacketizer::Create(kRtpVideoH264, kMaxPayloadSize));
+ RtpPacketizer::Create(kRtpVideoH264, kMaxPayloadSize, NULL, kFrameEmpty));
packetizer->SetPayloadData(frame, kFrameSize, &fragmentation);
// First expecting two FU-A packets.
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 00000000..c28aa13b
--- /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 93fcfa88..23a4e6be 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 049bd05e..a3d673b3 100644
--- a/modules/rtp_rtcp/source/rtp_format_vp8.cc
+++ b/modules/rtp_rtcp/source/rtp_format_vp8.cc
@@ -10,14 +10,228 @@
#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.
@@ -107,6 +321,29 @@ bool RtpPacketizerVp8::NextPacket(uint8_t* buffer,
return true;
}
+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 {
@@ -123,17 +360,17 @@ int RtpPacketizerVp8::CalcNextSize(int max_payload_len,
// 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 RtpPacketizerVp8::GeneratePackets() {
- if (max_payload_len_ < vp8_fixed_payload_descriptor_bytes_
- + PayloadDescriptorExtraLength() + 1) {
+ 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;
@@ -143,16 +380,18 @@ int RtpPacketizerVp8::GeneratePackets() {
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;
@@ -165,7 +404,7 @@ int RtpPacketizerVp8::GeneratePackets() {
// 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,
@@ -181,7 +420,9 @@ int RtpPacketizerVp8::GeneratePackets() {
}
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);
@@ -193,15 +434,15 @@ int RtpPacketizerVp8::GeneratePackets() {
}
int RtpPacketizerVp8::GeneratePacketsBalancedAggregates() {
- if (max_payload_len_ < vp8_fixed_payload_descriptor_bytes_
- + PayloadDescriptorExtraLength() + 1) {
+ 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);
@@ -217,10 +458,11 @@ int RtpPacketizerVp8::GeneratePacketsBalancedAggregates() {
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) {
@@ -237,13 +479,15 @@ int RtpPacketizerVp8::GeneratePacketsBalancedAggregates() {
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;
}
}
@@ -259,8 +503,8 @@ void RtpPacketizerVp8::AggregateSmallPartitions(std::vector<int>* partition_vec,
*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;
@@ -271,12 +515,12 @@ void RtpPacketizerVp8::AggregateSmallPartitions(std::vector<int>* partition_vec,
// 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);
}
@@ -328,19 +572,23 @@ int RtpPacketizerVp8::WriteHeaderAndPayload(const InfoStruct& packet_info,
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 RtpPacketizerVp8::WriteExtensionFields(uint8_t* buffer,
@@ -351,20 +599,20 @@ int RtpPacketizerVp8::WriteExtensionFields(uint8_t* buffer,
*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;
}
}
@@ -380,18 +628,18 @@ int RtpPacketizerVp8::WritePictureIDFields(uint8_t* x_field,
*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 RtpPacketizerVp8::WritePictureID(uint8_t* buffer, int buffer_length) const {
- const uint16_t pic_id =
- static_cast<uint16_t> (hdr_info_.pictureId);
+ 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;
@@ -405,13 +653,13 @@ 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) {
+ 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;
}
@@ -420,8 +668,8 @@ 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) {
+ if (buffer_length <
+ vp8_fixed_payload_descriptor_bytes_ + *extension_length + 1) {
return -1;
}
uint8_t* data_field =
@@ -443,9 +691,12 @@ int RtpPacketizerVp8::WriteTIDAndKeyIdxFields(uint8_t* x_field,
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;
}
@@ -460,8 +711,8 @@ int RtpPacketizerVp8::PictureIdLength() const {
}
bool RtpPacketizerVp8::XFieldPresent() const {
- return (TIDFieldPresent() || TL0PicIdxFieldPresent() || PictureIdPresent()
- || KeyIdxFieldPresent());
+ return (TIDFieldPresent() || TL0PicIdxFieldPresent() || PictureIdPresent() ||
+ KeyIdxFieldPresent());
}
bool RtpPacketizerVp8::TIDFieldPresent() const {
@@ -477,4 +728,25 @@ bool RtpPacketizerVp8::KeyIdxFieldPresent() 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 755d19ed..85a3304d 100644
--- a/modules/rtp_rtcp/source/rtp_format_vp8.h
+++ b/modules/rtp_rtcp/source/rtp_format_vp8.h
@@ -79,6 +79,12 @@ class RtpPacketizerVp8 : public RtpPacketizer {
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 {
int payload_start_pos;
@@ -96,19 +102,20 @@ class RtpPacketizerVp8 : public RtpPacketizer {
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 @@ class RtpPacketizerVp8 : public RtpPacketizer {
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 @@ class RtpPacketizerVp8 : public RtpPacketizer {
// 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
@@ -202,5 +214,22 @@ class RtpPacketizerVp8 : public RtpPacketizer {
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_unittest.cc b/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc
index 8dfc27ac..7a4dbcf6 100644
--- a/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc
@@ -12,17 +12,76 @@
* 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);
+using ::testing::_;
+using ::testing::Args;
+using ::testing::ElementsAreArray;
+using ::testing::Return;
+
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:
@@ -35,7 +94,8 @@ class RtpPacketizerVp8Test : public ::testing::Test {
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);
}
@@ -59,14 +119,17 @@ TEST_F(RtpPacketizerVp8Test, TestStrictMode) {
// 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(RtpPacketizerVp8Test, TestAggregateMode) {
@@ -89,8 +152,11 @@ TEST_F(RtpPacketizerVp8Test, TestAggregateMode) {
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(RtpPacketizerVp8Test, TestAggregateModeManyPartitions1) {
@@ -113,8 +179,11 @@ TEST_F(RtpPacketizerVp8Test, TestAggregateModeManyPartitions1) {
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(RtpPacketizerVp8Test, TestAggregateModeManyPartitions2) {
@@ -137,8 +206,11 @@ TEST_F(RtpPacketizerVp8Test, TestAggregateModeManyPartitions2) {
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(RtpPacketizerVp8Test, TestAggregateModeTwoLargePartitions) {
@@ -161,8 +233,11 @@ TEST_F(RtpPacketizerVp8Test, TestAggregateModeTwoLargePartitions) {
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.
@@ -172,7 +247,7 @@ TEST_F(RtpPacketizerVp8Test, TestEqualSizeModeFallback) {
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.
+ const int kMaxSize = 12; // Small enough to produce 4 packets.
RtpPacketizerVp8 packetizer(hdr_info_, kMaxSize);
packetizer.SetPayloadData(
helper_->payload_data(), helper_->payload_size(), NULL);
@@ -187,8 +262,11 @@ TEST_F(RtpPacketizerVp8Test, TestEqualSizeModeFallback) {
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.
@@ -213,8 +291,11 @@ TEST_F(RtpPacketizerVp8Test, TestNonReferenceBit) {
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.
@@ -241,8 +322,11 @@ TEST_F(RtpPacketizerVp8Test, TestTl0PicIdxAndTID) {
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.
@@ -267,8 +351,11 @@ TEST_F(RtpPacketizerVp8Test, TestKeyIdx) {
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.
@@ -294,8 +381,202 @@ TEST_F(RtpPacketizerVp8Test, TestTIDAndKeyIdx) {
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_packet_history.h b/modules/rtp_rtcp/source/rtp_packet_history.h
index 190e5057..253f6d0a 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_receiver_impl.cc b/modules/rtp_rtcp/source/rtp_receiver_impl.cc
index 7493488d..22fae100 100644
--- a/modules/rtp_rtcp/source/rtp_receiver_impl.cc
+++ b/modules/rtp_rtcp/source/rtp_receiver_impl.cc
@@ -24,7 +24,6 @@ namespace webrtc {
using RtpUtility::GetCurrentRTP;
using RtpUtility::Payload;
-using RtpUtility::RTPPayloadParser;
using RtpUtility::StringCompare;
RtpReceiver* RtpReceiver::CreateVideoReceiver(
@@ -96,16 +95,6 @@ RtpReceiverImpl::~RtpReceiverImpl() {
}
}
-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 264225cc..60688118 100644
--- a/modules/rtp_rtcp/source/rtp_receiver_impl.h
+++ b/modules/rtp_rtcp/source/rtp_receiver_impl.h
@@ -34,53 +34,42 @@ class RtpReceiverImpl : public RtpReceiver {
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;
-
- uint32_t SSRC() const;
-
- int32_t CSRCs(uint32_t array_of_csrc[kRtpCsrcSize]) const;
+ virtual bool Timestamp(uint32_t* timestamp) const OVERRIDE;
+ virtual bool LastReceivedTimeMs(int64_t* receive_time_ms) const OVERRIDE;
- int32_t Energy(uint8_t array_of_energy[kRtpCsrcSize]) const;
+ virtual uint32_t SSRC() const OVERRIDE;
- // RTX.
- void SetRTXStatus(bool enable, uint32_t ssrc);
+ virtual int32_t CSRCs(uint32_t array_of_csrc[kRtpCsrcSize]) const OVERRIDE;
- void RTXStatus(bool* enable, uint32_t* ssrc, int* payload_type) const;
+ virtual int32_t Energy(uint8_t array_of_energy[kRtpCsrcSize]) const OVERRIDE;
- 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 5eb5710f..058d91e3 100644
--- a/modules/rtp_rtcp/source/rtp_receiver_video.cc
+++ b/modules/rtp_rtcp/source/rtp_receiver_video.cc
@@ -29,13 +29,13 @@ RTPReceiverStrategy* RTPReceiverStrategy::CreateVideoStrategy(
}
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;
}
@@ -47,17 +47,19 @@ int32_t RTPReceiverVideo::OnNewPayloadTypeCreated(
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 =
@@ -67,12 +69,16 @@ int32_t RTPReceiverVideo::ParseRtpPacket(
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 {
@@ -91,8 +97,9 @@ int32_t RTPReceiverVideo::InvokeOnInitializeDecoder(
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;
@@ -100,36 +107,8 @@ int32_t RTPReceiverVideo::InvokeOnInitializeDecoder(
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 kRtpVideoH264: {
- scoped_ptr<RtpDepacketizer> depacketizer(RtpDepacketizer::Create(
- rtp_header->type.Video.codec, data_callback_));
- return depacketizer->Parse(rtp_header, payload_data, payload_data_length)
- ? 0
- : -1;
- }
- 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) {
@@ -161,73 +140,4 @@ int32_t RTPReceiverVideo::BuildRTPheader(
return rtp_header_length;
}
-int32_t RTPReceiverVideo::ReceiveVp8Codec(WebRtcRTPHeader* rtp_header,
- const uint8_t* payload_data,
- uint16_t payload_data_length) {
- RtpUtility::RTPPayload parsed_packet;
- RtpUtility::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 == RtpUtility::kIFrame)
- ? kVideoFrameKey
- : kVideoFrameDelta;
-
- RTPVideoHeaderVP8* to_header = &rtp_header->type.Video.codecHeader.VP8;
- RtpUtility::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 365e4d74..8fe4acb8 100644
--- a/modules/rtp_rtcp/source/rtp_receiver_video.h
+++ b/modules/rtp_rtcp/source/rtp_receiver_video.h
@@ -22,27 +22,24 @@ namespace webrtc {
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;
@@ -61,28 +58,8 @@ class RTPReceiverVideo : public RTPReceiverStrategy {
void SetPacketOverHead(uint16_t packet_over_head);
private:
- 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);
-
- int32_t ReceiveH264Codec(WebRtcRTPHeader* rtp_header,
- const uint8_t* payload_data,
- uint16_t payload_data_length);
-
int32_t BuildRTPheader(const WebRtcRTPHeader* rtp_header,
uint8_t* data_buffer) const;
-
- 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 05741a06..a6d21154 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp.gypi
+++ b/modules/rtp_rtcp/source/rtp_rtcp.gypi
@@ -92,6 +92,7 @@
'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 b4dfefcb..69b5bb42 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
@@ -1034,10 +1034,6 @@ int32_t ModuleRtpRtcpImpl::SendREDPayloadType(
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()) {
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl.h b/modules/rtp_rtcp/source/rtp_rtcp_impl.h
index 4a23dd40..a015a3e3 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl.h
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl.h
@@ -42,7 +42,7 @@ class ModuleRtpRtcpImpl : public RtpRtcp {
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 @@ class ModuleRtpRtcpImpl : public RtpRtcp {
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(
@@ -89,9 +89,9 @@ class ModuleRtpRtcpImpl : public RtpRtcp {
virtual int32_t SetCSRCStatus(const bool include) OVERRIDE;
- virtual RTCPSender::FeedbackState GetFeedbackState();
+ RTCPSender::FeedbackState GetFeedbackState();
- virtual int CurrentSendFrequencyHz() const;
+ int CurrentSendFrequencyHz() const;
virtual void SetRTXSendStatus(const int mode) OVERRIDE;
@@ -295,8 +295,6 @@ class ModuleRtpRtcpImpl : public RtpRtcp {
// Video part.
- virtual RtpVideoCodecTypes SendVideoCodec() const;
-
virtual int32_t SendRTCPSliceLossIndication(
const uint8_t picture_id) OVERRIDE;
@@ -326,11 +324,11 @@ class ModuleRtpRtcpImpl : public RtpRtcp {
const FecProtectionParams* delta_params,
const FecProtectionParams* key_params) OVERRIDE;
- virtual bool LastReceivedNTP(uint32_t* NTPsecs,
- uint32_t* NTPfrac,
- uint32_t* remote_sr) const;
+ 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);
@@ -339,18 +337,18 @@ class ModuleRtpRtcpImpl : public RtpRtcp {
uint32_t* fec_rate,
uint32_t* nackRate) const OVERRIDE;
- virtual uint32_t SendTimeOfSendReport(const uint32_t send_report);
+ 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();
diff --git a/modules/rtp_rtcp/source/rtp_sender.cc b/modules/rtp_rtcp/source/rtp_sender.cc
index d5bffa9f..f544db21 100644
--- a/modules/rtp_rtcp/source/rtp_sender.cc
+++ b/modules/rtp_rtcp/source/rtp_sender.cc
@@ -283,6 +283,11 @@ int32_t RTPSender::DeRegisterSendPayload(
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_;
@@ -385,7 +390,7 @@ int32_t RTPSender::CheckPayloadType(const int8_t payload_type,
LOG(LS_WARNING) << "Payload type " << payload_type << " not registered.";
return -1;
}
- payload_type_ = payload_type;
+ SetSendPayloadType(payload_type);
RtpUtility::Payload* payload = it->second;
assert(payload);
if (!payload->audio && !audio_configured_) {
diff --git a/modules/rtp_rtcp/source/rtp_sender.h b/modules/rtp_rtcp/source/rtp_sender.h
index 39bcb0ce..b2f2e0c4 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.
@@ -100,6 +100,8 @@ class RTPSender : public RTPSenderInterface, public Bitrate::Observer {
int32_t DeRegisterSendPayload(const int8_t payload_type);
+ void SetSendPayloadType(int8_t payload_type);
+
int8_t SendPayloadType() const;
int SendPayloadFrequency() const;
diff --git a/modules/rtp_rtcp/source/rtp_sender_audio.cc b/modules/rtp_rtcp/source/rtp_sender_audio.cc
index 99c00851..7efe9871 100644
--- a/modules/rtp_rtcp/source/rtp_sender_audio.cc
+++ b/modules/rtp_rtcp/source/rtp_sender_audio.cc
@@ -318,13 +318,15 @@ int32_t RTPSenderAudio::SendAudio(
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;
diff --git a/modules/rtp_rtcp/source/rtp_sender_unittest.cc b/modules/rtp_rtcp/source/rtp_sender_unittest.cc
index e9b01def..7b62d0b8 100644
--- a/modules/rtp_rtcp/source/rtp_sender_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_sender_unittest.cc
@@ -1073,6 +1073,61 @@ TEST_F(RtpSenderAudioTest, SendAudioWithAudioLevelExtension) {
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;
diff --git a/modules/rtp_rtcp/source/rtp_sender_video.cc b/modules/rtp_rtcp/source/rtp_sender_video.cc
index da58f616..ec031dfc 100644
--- a/modules/rtp_rtcp/source/rtp_sender_video.cc
+++ b/modules/rtp_rtcp/source/rtp_sender_video.cc
@@ -31,8 +31,7 @@ struct RtpPacket {
ForwardErrorCorrection::Packet* pkt;
};
-RTPSenderVideo::RTPSenderVideo(Clock* clock,
- RTPSenderInterface* rtpSender)
+RTPSenderVideo::RTPSenderVideo(Clock* clock, RTPSenderInterface* rtpSender)
: _rtpSender(*rtpSender),
_sendVideoCritsect(CriticalSectionWrapper::CreateCriticalSection()),
_videoType(kRtpVideoGeneric),
@@ -55,29 +54,23 @@ RTPSenderVideo::RTPSenderVideo(Clock* clock,
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(
@@ -106,34 +99,34 @@ int32_t RTPSenderVideo::RegisterVideoPayload(
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;
@@ -144,34 +137,36 @@ RTPSenderVideo::SendVideoPacket(uint8_t* data_buffer,
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;
@@ -185,9 +180,12 @@ RTPSenderVideo::SendVideoPacket(uint8_t* data_buffer,
_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,
@@ -200,69 +198,61 @@ RTPSenderVideo::SendVideoPacket(uint8_t* data_buffer,
return ret;
}
-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
-
- 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);
+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
+
+ 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);
}
-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(
@@ -299,206 +289,58 @@ int32_t RTPSenderVideo::SendVideo(const RtpVideoCodecTypes videoType,
// Will be extracted in SendVP8 for VP8 codec; other codecs use 0
_numberFirstPartition = 0;
- switch (videoType) {
- case kRtpVideoGeneric:
- return SendGeneric(frameType,
- payloadType,
- captureTimeStamp,
- capture_time_ms,
- payloadData,
- payloadSize);
- case kRtpVideoVp8:
- return SendVP8(frameType,
- payloadType,
- captureTimeStamp,
- capture_time_ms,
- payloadData,
- payloadSize,
- fragmentation,
- rtpTypeHdr);
- case kRtpVideoH264:
- return SendH264(frameType,
- payloadType,
- captureTimeStamp,
- capture_time_ms,
- payloadData,
- payloadSize,
- fragmentation,
- rtpTypeHdr)
- ? 0
- : -1;
- default:
- assert(false);
- break;
- }
- 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);
- uint16_t rtp_header_length = _rtpSender.RTPHeaderLength();
- uint16_t max_length = _rtpSender.MaxPayloadLength() - FECPacketOverhead() -
- rtp_header_length - (1 /* generic header length */);
-
- // 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);
-
- // Fragment packet into packets of max MaxPayloadLength bytes payload.
- uint8_t buffer[IP_PACKET_SIZE];
-
- uint8_t generic_header = RtpFormatVideoGeneric::kFirstPacketBit;
- if (frame_type == kVideoFrameKey) {
- generic_header |= RtpFormatVideoGeneric::kKeyFrameBit;
- }
-
- 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;
- }
-
- 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;
- }
- }
- return 0;
+ return Send(videoType,
+ frameType,
+ payloadType,
+ captureTimeStamp,
+ capture_time_ms,
+ payloadData,
+ payloadSize,
+ fragmentation,
+ rtpTypeHdr)
+ ? 0
+ : -1;
}
-VideoCodecInformation*
-RTPSenderVideo::CodecInformationVideo()
-{
- return _videoCodecInformation;
+VideoCodecInformation* RTPSenderVideo::CodecInformationVideo() {
+ return _videoCodecInformation;
}
-void
-RTPSenderVideo::SetMaxConfiguredBitrateVideo(const uint32_t maxBitrate)
-{
- _maxBitrate = maxBitrate;
+void RTPSenderVideo::SetMaxConfiguredBitrateVideo(const uint32_t maxBitrate) {
+ _maxBitrate = maxBitrate;
}
-uint32_t
-RTPSenderVideo::MaxConfiguredBitrateVideo() const
-{
- return _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.
- RtpPacketizerVp8 packetizer(rtpTypeHdr->VP8, maxPayloadLengthVP8);
- packetizer.SetPayloadData(data, payloadBytesToSend, NULL);
-
- StorageType storage = kAllowRetransmission;
- if (rtpTypeHdr->VP8.temporalIdx == 0 &&
- !(_retransmissionSettings & kRetransmitBaseLayer)) {
- storage = kDontRetransmit;
- } else if (rtpTypeHdr->VP8.temporalIdx != kNoTemporalIdx &&
- rtpTypeHdr->VP8.temporalIdx > 0 &&
- !(_retransmissionSettings & kRetransmitHigherLayers)) {
- storage = kDontRetransmit;
- }
-
- bool last = false;
- _numberFirstPartition = 0;
- // |rtpTypeHdr->VP8.temporalIdx| is zero for base layers, or kNoTemporalIdx
- // if the field isn't used (so all layers are the base layer). We currently
- // only protect base layers, so look for these two cases.
- bool protect = rtpTypeHdr->VP8.temporalIdx == 0 ||
- rtpTypeHdr->VP8.temporalIdx == kNoTemporalIdx;
- while (!last)
- {
- // Write VP8 Payload Descriptor and VP8 payload.
- uint8_t dataBuffer[IP_PACKET_SIZE] = {0};
- size_t payloadBytesInPacket = 0;
- if (!packetizer.NextPacket(
- &dataBuffer[rtpHeaderLength], &payloadBytesInPacket, &last))
- 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;
-}
-
-bool RTPSenderVideo::SendH264(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) {
- size_t rtp_header_length = _rtpSender.RTPHeaderLength();
+bool RTPSenderVideo::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) {
+ uint16_t rtp_header_length = _rtpSender.RTPHeaderLength();
int32_t payload_bytes_to_send = payloadSize;
const uint8_t* data = payloadData;
size_t max_payload_length = _rtpSender.MaxDataPayloadLength();
- scoped_ptr<RtpPacketizer> packetizer(
- RtpPacketizer::Create(kRtpVideoH264, max_payload_length));
- packetizer->SetPayloadData(data, payload_bytes_to_send, fragmentation);
+ scoped_ptr<RtpPacketizer> packetizer(RtpPacketizer::Create(
+ videoType, max_payload_length, rtpTypeHdr, frameType));
- StorageType storage = kAllowRetransmission;
- bool protect = (frameType == kVideoFrameKey);
- bool last = false;
+ // 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;
+
+ packetizer->SetPayloadData(data, payload_bytes_to_send, frag);
+ bool last = false;
while (!last) {
- // Write H264 payload.
uint8_t dataBuffer[IP_PACKET_SIZE] = {0};
size_t payload_bytes_in_packet = 0;
if (!packetizer->NextPacket(
@@ -515,13 +357,16 @@ bool RTPSenderVideo::SendH264(const FrameType frameType,
rtp_header_length,
captureTimeStamp,
capture_time_ms,
- storage,
- protect)) {
- LOG(LS_WARNING)
- << "RTPSenderVideo::SendH264 failed to send packet number "
- << _rtpSender.SequenceNumber();
+ packetizer->GetStorageType(_retransmissionSettings),
+ packetizer->GetProtectionType() == kProtectedPacket)) {
+ LOG(LS_WARNING) << packetizer->ToString()
+ << " failed to send packet number "
+ << _rtpSender.SequenceNumber();
}
}
+
+ TRACE_EVENT_ASYNC_END1(
+ "webrtc", "Video", capture_time_ms, "timestamp", _rtpSender.Timestamp());
return true;
}
diff --git a/modules/rtp_rtcp/source/rtp_sender_video.h b/modules/rtp_rtcp/source/rtp_sender_video.h
index 77b91c99..250e36b9 100644
--- a/modules/rtp_rtcp/source/rtp_sender_video.h
+++ b/modules/rtp_rtcp/source/rtp_sender_video.h
@@ -28,122 +28,106 @@ namespace webrtc {
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,
- RtpUtility::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);
- bool SendH264(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;
+ 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:
+ 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 95389b46..441a9c50 100644
--- a/modules/rtp_rtcp/source/rtp_utility.cc
+++ b/modules/rtp_rtcp/source/rtp_utility.cc
@@ -188,33 +188,6 @@ uint32_t pow2(uint8_t exp) {
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),
@@ -565,208 +538,6 @@ uint8_t RtpHeaderParser::ParsePaddingBytes(
}
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 RtpUtility
} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/rtp_utility.h b/modules/rtp_rtcp/source/rtp_utility.h
index ef50570d..3a3ad5ee 100644
--- a/modules/rtp_rtcp/source/rtp_utility.h
+++ b/modules/rtp_rtcp/source/rtp_utility.h
@@ -115,97 +115,7 @@ namespace RtpUtility {
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 RtpUtility
-
+} // 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 82ec953c..00000000
--- 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 RtpUtility.
- */
-
-#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 RtpUtility::RTPPayloadParser;
-using RtpUtility::RTPPayload;
-using RtpUtility::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(RtpUtility::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(RtpUtility::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(RtpUtility::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(RtpUtility::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(RtpUtility::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(RtpUtility::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;
- RtpPacketizerVp8 packetizer(inputHeader, 20);
- packetizer.SetPayloadData(payload, 10, NULL);
- bool last;
- size_t send_bytes;
- ASSERT_TRUE(packetizer.NextPacket(packet, &send_bytes, &last));
- ASSERT_TRUE(last);
-
- RTPPayloadParser rtpPayloadParser(kRtpVideoVp8, packet, send_bytes);
-
- RTPPayload parsedPacket;
- ASSERT_TRUE(rtpPayloadParser.Parse(parsedPacket));
-
- EXPECT_EQ(RtpUtility::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/test/BWEStandAlone/BWEStandAlone.cc b/modules/rtp_rtcp/test/BWEStandAlone/BWEStandAlone.cc
index 71809755..9e706e7d 100644
--- a/modules/rtp_rtcp/test/BWEStandAlone/BWEStandAlone.cc
+++ b/modules/rtp_rtcp/test/BWEStandAlone/BWEStandAlone.cc
@@ -33,14 +33,14 @@ public:
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 6edb380e..ade827e2 100644
--- a/modules/rtp_rtcp/test/BWEStandAlone/TestSenderReceiver.h
+++ b/modules/rtp_rtcp/test/BWEStandAlone/TestSenderReceiver.h
@@ -71,12 +71,15 @@ public:
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 @@ public:
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/utility/BUILD.gn b/modules/utility/BUILD.gn
index 82512046..ff321127 100644
--- a/modules/utility/BUILD.gn
+++ b/modules/utility/BUILD.gn
@@ -30,13 +30,19 @@ source_set("utility") {
"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 (enable_video) {
+ if (rtc_enable_video) {
sources += [
"source/frame_scaler.cc",
"source/video_coder.cc",
diff --git a/modules/utility/OWNERS b/modules/utility/OWNERS
index dbdb53e3..b373fb16 100644
--- a/modules/utility/OWNERS
+++ b/modules/utility/OWNERS
@@ -1,5 +1,4 @@
henrike@webrtc.org
-pwestin@webrtc.org
asapersson@webrtc.org
perkj@webrtc.org
diff --git a/modules/utility/source/Android.mk b/modules/utility/source/Android.mk
deleted file mode 100644
index 929bd7ce..00000000
--- 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 ead1e223..e04372d9 100644
--- a/modules/utility/source/coder.h
+++ b/modules/utility/source/coder.h
@@ -27,11 +27,11 @@ public:
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 @@ public:
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 ff3f07ce..0b721322 100644
--- a/modules/utility/source/rtp_dump_impl.h
+++ b/modules/utility/source/rtp_dump_impl.h
@@ -22,10 +22,11 @@ public:
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;
diff --git a/modules/utility/source/video_coder.h b/modules/utility/source/video_coder.h
index 8e4344be..03aa5111 100644
--- a/modules/utility/source/video_coder.h
+++ b/modules/utility/source/video_coder.h
@@ -43,11 +43,11 @@ public:
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 @@ private:
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 971f282b..00000000
--- 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
index fd3fe574..b9f3d2f3 100644
--- a/modules/video_capture/BUILD.gn
+++ b/modules/video_capture/BUILD.gn
@@ -8,6 +8,161 @@
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") {
- # TODO(glaznev): Implement.
+ 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 cc79c075..ceac1421 100644
--- a/modules/video_capture/OWNERS
+++ b/modules/video_capture/OWNERS
@@ -1,10 +1,8 @@
-fischman@webrtc.org
glaznev@webrtc.org
mallinath@webrtc.org
mflodman@webrtc.org
perkj@webrtc.org
tkchin@webrtc.org
-wu@webrtc.org
per-file *.isolate=kjellander@webrtc.org
diff --git a/modules/video_capture/android/OWNERS b/modules/video_capture/android/OWNERS
deleted file mode 100644
index 6ba5af0b..00000000
--- 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 4a80fe27..82a3a95f 100644
--- a/modules/video_capture/android/device_info_android.cc
+++ b/modules/video_capture/android/device_info_android.cc
@@ -234,14 +234,20 @@ void DeviceInfoAndroid::GetMFpsRange(const char* deviceUniqueIdUTF8,
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 2f571d0c..c1db65ac 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
@@ -47,6 +47,7 @@ public class VideoCaptureAndroid implements PreviewCallback, Callback {
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 cameraSurfaceTexture;
private int[] cameraGlTextures = null;
@@ -76,6 +77,9 @@ public class VideoCaptureAndroid implements PreviewCallback, Callback {
final VideoCaptureAndroid self = this;
orientationListener = new OrientationEventListener(GetContext()) {
@Override public void onOrientationChanged(int degrees) {
+ if (!self.orientationListenerEnabled) {
+ return;
+ }
if (degrees == OrientationEventListener.ORIENTATION_UNKNOWN) {
return;
}
@@ -133,6 +137,7 @@ public class VideoCaptureAndroid implements PreviewCallback, Callback {
}
});
boolean startResult = exchange(result, false); // |false| is a dummy value.
+ orientationListenerEnabled = true;
orientationListener.enable();
return startResult;
}
@@ -219,6 +224,7 @@ public class VideoCaptureAndroid implements PreviewCallback, Callback {
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() {
diff --git a/modules/video_capture/ensure_initialized.cc b/modules/video_capture/ensure_initialized.cc
index 65c9a8db..9d43d9f1 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 @@ void EnsureInitialized() {}
} // 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 @@ void EnsureInitializedOnce() {
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 7398af60..6e728d15 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 ec92d31e..f78437d1 100644
--- a/modules/video_capture/include/video_capture_factory.h
+++ b/modules/video_capture/include/video_capture_factory.h
@@ -36,10 +36,6 @@ class VideoCaptureFactory {
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 ac90b72a..b5c53b19 100644
--- a/modules/video_capture/ios/rtc_video_capture_ios_objc.mm
+++ b/modules/video_capture/ios/rtc_video_capture_ios_objc.mm
@@ -204,12 +204,31 @@ using namespace webrtc::videocapturemodule;
[_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];
diff --git a/modules/video_capture/video_capture.gypi b/modules/video_capture/video_capture.gypi
index 7382a1cd..888d7727 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,127 +32,128 @@
'video_capture_impl.cc',
'video_capture_impl.h',
],
+ },
+ {
+ # 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': [
- ['include_internal_video_capture==0', {
+ ['OS=="linux"', {
'sources': [
- 'external/device_info_external.cc',
- 'external/video_capture_external.cc',
+ 'linux/device_info_linux.cc',
+ 'linux/device_info_linux.h',
+ 'linux/video_capture_linux.cc',
+ 'linux/video_capture_linux.h',
],
- }, { # 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',
+ }], # 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',
],
- }], # 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',
+ },
+ },
+ }], # 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',
],
- 'xcode_settings': {
- 'CLANG_ENABLE_OBJC_ARC': 'YES',
- 'WARNING_CFLAGS': [
- # To avoid warnings for deprecated videoMinFrameDuration and
- # videoMaxFrameDuration properties in iOS 7.0.
- # See webrtc:3705 for more details.
- '-Wno-deprecated-declarations',
- ],
- },
- 'all_dependent_settings': {
- 'xcode_settings': {
- 'OTHER_LDFLAGS': [
- '-framework AVFoundation',
- '-framework CoreMedia',
- '-framework CoreVideo',
- '-framework UIKit',
- ],
- },
- },
- }], # ios
- ], # conditions
- }], # include_internal_video_capture
+ },
+ },
+ }], # 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': [
{
@@ -156,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',
@@ -182,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': [
@@ -211,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 00000000..1a90af13
--- /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 27753d1f..9331bf73 100644
--- a/modules/video_capture_module.target.darwin-arm.mk
+++ b/modules/video_capture_module.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ 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 \
- 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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -54,13 +50,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -98,12 +95,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +144,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -161,7 +162,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -179,13 +179,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -223,12 +223,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +273,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -288,50 +292,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 3a3aadd4..7914cac5 100644
--- a/modules/video_capture_module.target.darwin-arm64.mk
+++ b/modules/video_capture_module.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ 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 \
- 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,6 +61,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -87,12 +84,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +130,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +146,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -197,12 +197,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +244,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -258,42 +262,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 cb575597..f00ee08c 100644
--- a/modules/video_capture_module.target.darwin-mips.mk
+++ b/modules/video_capture_module.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ 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 \
- 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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -55,8 +51,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -71,6 +65,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -94,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +137,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -156,7 +155,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -175,8 +173,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -214,12 +210,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +259,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -278,46 +278,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/video_capture_module.target.darwin-x86.mk
index e53bddaf..5b4c2841 100644
--- a/modules/video_capture_module.target.darwin-x86.mk
+++ b/modules/video_capture_module.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ 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 \
- 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 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -93,12 +90,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +136,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -151,7 +152,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -209,12 +209,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +256,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -270,46 +274,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 3f108936..17c62a4f 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 @@ include $(CLEAR_VARS)
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 @@ 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 \
- 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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -69,6 +65,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -92,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +135,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -151,7 +152,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -207,12 +207,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +254,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -268,46 +272,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 27753d1f..9331bf73 100644
--- a/modules/video_capture_module.target.linux-arm.mk
+++ b/modules/video_capture_module.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ 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 \
- 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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -54,13 +50,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -98,12 +95,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +144,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -161,7 +162,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -179,13 +179,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -223,12 +223,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +273,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -288,50 +292,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 3a3aadd4..7914cac5 100644
--- a/modules/video_capture_module.target.linux-arm64.mk
+++ b/modules/video_capture_module.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ 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 \
- 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,6 +61,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -87,12 +84,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +130,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +146,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -197,12 +197,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +244,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -258,42 +262,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 cb575597..f00ee08c 100644
--- a/modules/video_capture_module.target.linux-mips.mk
+++ b/modules/video_capture_module.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ 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 \
- 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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -55,8 +51,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -71,6 +65,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -94,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +137,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -156,7 +155,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -175,8 +173,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -214,12 +210,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +259,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -278,46 +278,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/video_capture_module.target.linux-x86.mk
index e53bddaf..5b4c2841 100644
--- a/modules/video_capture_module.target.linux-x86.mk
+++ b/modules/video_capture_module.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ 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 \
- 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 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -93,12 +90,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +136,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -151,7 +152,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -209,12 +209,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +256,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -270,46 +274,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 3f108936..17c62a4f 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 @@ include $(CLEAR_VARS)
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 @@ 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 \
- 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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -69,6 +65,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -92,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +135,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -151,7 +152,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -207,12 +207,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +254,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -268,46 +272,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 00000000..3324f8e3
--- /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 00000000..06d26859
--- /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 00000000..efea2a32
--- /dev/null
+++ b/modules/video_capture_module_impl.target.darwin-mips.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_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 \
+ -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 \
+ -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' \
+ '-DMIPS32_LE' \
+ '-DMIPS_FPU_LE' \
+ '-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 \
+ -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 \
+ -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' \
+ '-DMIPS32_LE' \
+ '-DMIPS_FPU_LE' \
+ '-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 00000000..31a9a10e
--- /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 00000000..e3a8333e
--- /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 00000000..3324f8e3
--- /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 00000000..06d26859
--- /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 00000000..efea2a32
--- /dev/null
+++ b/modules/video_capture_module_impl.target.linux-mips.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_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 \
+ -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 \
+ -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' \
+ '-DMIPS32_LE' \
+ '-DMIPS_FPU_LE' \
+ '-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 \
+ -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 \
+ -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' \
+ '-DMIPS32_LE' \
+ '-DMIPS_FPU_LE' \
+ '-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 00000000..31a9a10e
--- /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 00000000..e3a8333e
--- /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
index cbd12936..42d5d5ce 100644
--- a/modules/video_coding/BUILD.gn
+++ b/modules/video_coding/BUILD.gn
@@ -64,6 +64,12 @@ source_set("video_coding") {
"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",
@@ -79,6 +85,12 @@ source_set("video_coding_utility") {
"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" ]
}
@@ -88,6 +100,12 @@ source_set("webrtc_i420") {
"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" ]
}
@@ -107,12 +125,19 @@ source_set("webrtc_vp8") {
# "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 (build_libvpx) {
+# if (rtc_build_libvpx) {
# deps += [
# "//third_party/libvpx",
# ]
diff --git a/modules/video_coding/OWNERS b/modules/video_coding/OWNERS
index 037de93f..897a0b28 100644
--- a/modules/video_coding/OWNERS
+++ b/modules/video_coding/OWNERS
@@ -1,5 +1,4 @@
stefan@webrtc.org
-mikhal@webrtc.org
marpan@webrtc.org
henrik.lundin@webrtc.org
diff --git a/modules/video_coding/codecs/OWNERS b/modules/video_coding/codecs/OWNERS
index 7183cf21..3f904dd1 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 d73e77d2..00000000
--- 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 e6b1d097..82bcd26d 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
{
@@ -63,106 +62,6 @@ struct CodecSpecificInfo
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 75fe63fe..1e2c9b8f 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 e7b934dc..bd4a563f 100644
--- a/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc
+++ b/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc
@@ -703,34 +703,26 @@ TEST_F(VideoProcessorIntegrationTest,
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/vp8/Android.mk b/modules/video_coding/codecs/vp8/Android.mk
deleted file mode 100644
index 7db37ec7..00000000
--- 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 4901edff..2a2a9d04 100644
--- a/modules/video_coding/codecs/vp8/vp8_impl.cc
+++ b/modules/video_coding/codecs/vp8/vp8_impl.cc
@@ -105,6 +105,7 @@ int VP8EncoderImpl::SetRates(uint32_t new_bitrate_kbit,
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 @@ int VP8EncoderImpl::InitEncode(const VideoCodec* inst,
// 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 @@ int VP8EncoderImpl::InitEncode(const VideoCodec* inst,
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 @@ int VP8EncoderImpl::InitEncode(const VideoCodec* inst,
cpu_speed_ = -12;
#endif
rps_->Init();
+ quality_scaler_.Init(codec_.qpMax);
+ quality_scaler_.ReportFramerate(codec_.maxFramerate);
return InitAndSetControlSettings(inst);
}
@@ -296,6 +299,7 @@ int VP8EncoderImpl::InitAndSetControlSettings(const VideoCodec* inst) {
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 @@ uint32_t VP8EncoderImpl::MaxIntraTarget(uint32_t optimalBuffersize) {
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 @@ int VP8EncoderImpl::Encode(const I420VideoFrame& input_image,
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 @@ int VP8EncoderImpl::Encode(const I420VideoFrame& input_image,
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 @@ int VP8EncoderImpl::Encode(const I420VideoFrame& input_image,
}
timestamp_ += duration;
- return GetEncodedPartitions(input_image);
+ return GetEncodedPartitions(frame);
}
int VP8EncoderImpl::UpdateCodecFrameSize(const I420VideoFrame& input_image) {
@@ -480,6 +490,11 @@ int VP8EncoderImpl::GetEncodedPartitions(const I420VideoFrame& input_image) {
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 56f7219f..08ce3c91 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 @@ class VP8EncoderImpl : public VP8Encoder {
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 6c954429..042da456 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -94,12 +93,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +143,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -158,7 +161,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -172,13 +174,13 @@ MY_CFLAGS_Release := \
-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,12 +218,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +269,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -282,50 +288,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 5c8b9403..b6427aa5 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,6 +59,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -83,12 +82,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +129,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -142,7 +145,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -190,12 +192,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +240,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -252,42 +258,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 c0d4e9af..45e18706 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,8 +48,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -66,6 +62,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +86,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +135,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -152,7 +153,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -166,8 +166,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -205,12 +203,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +253,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -270,46 +272,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/video_coding/codecs/vp8/webrtc_vp8.target.darwin-x86.mk
index 8ea99211..f151b351 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +135,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -148,7 +151,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,12 +204,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +252,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -264,46 +270,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 94c1156d..cbbbef8b 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -88,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +134,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -148,7 +151,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -200,12 +202,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +250,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -262,46 +268,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 6c954429..042da456 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -94,12 +93,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +143,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -158,7 +161,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -172,13 +174,13 @@ MY_CFLAGS_Release := \
-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,12 +218,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +269,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -282,50 +288,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 5c8b9403..b6427aa5 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,6 +59,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -83,12 +82,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +129,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -142,7 +145,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -190,12 +192,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +240,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -252,42 +258,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 c0d4e9af..45e18706 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,8 +48,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -66,6 +62,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +86,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +135,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -152,7 +153,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -166,8 +166,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -205,12 +203,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +253,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -270,46 +272,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/video_coding/codecs/vp8/webrtc_vp8.target.linux-x86.mk
index 8ea99211..f151b351 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +135,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -148,7 +151,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,12 +204,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +252,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -264,46 +270,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 94c1156d..cbbbef8b 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -88,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +134,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -148,7 +151,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -200,12 +202,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +250,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -262,46 +268,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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/source/Android.mk b/modules/video_coding/main/source/Android.mk
deleted file mode 100644
index a8cf2d0e..00000000
--- 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 e5013689..cd8f9d35 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,7 @@ bool VCMCodecDataBase::Codec(int list_id,
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
@@ -116,13 +140,7 @@ bool VCMCodecDataBase::Codec(int list_id,
settings->height = VCM_DEFAULT_CODEC_HEIGHT;
settings->numberOfSimulcastStreams = 0;
settings->qpMax = 56;
- settings->codecSpecific.H264.profile = kProfileBase;
- settings->codecSpecific.H264.frameDroppingOn = true;
- settings->codecSpecific.H264.keyFrameInterval = 3000;
- settings->codecSpecific.H264.spsData = NULL;
- settings->codecSpecific.H264.spsLen = 0;
- settings->codecSpecific.H264.ppsData = NULL;
- settings->codecSpecific.H264.ppsLen = 0;
+ settings->codecSpecific.H264 = VideoEncoder::GetDefaultH264Settings();
return true;
}
#endif
diff --git a/modules/video_coding/main/source/jitter_buffer.cc b/modules/video_coding/main/source/jitter_buffer.cc
index 9aa34090..d09fccd9 100644
--- a/modules/video_coding/main/source/jitter_buffer.cc
+++ b/modules/video_coding/main/source/jitter_buffer.cc
@@ -122,8 +122,7 @@ void FrameList::Reset(UnorderedFrameList* free_frames) {
}
}
-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 @@ VCMJitterBuffer::VCMJitterBuffer(Clock* clock,
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),
diff --git a/modules/video_coding/main/source/jitter_estimator.cc b/modules/video_coding/main/source/jitter_estimator.cc
index 71c54a00..b36775a4 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 @@ VCMJitterEstimator::VCMJitterEstimator(int32_t vcmId, int32_t receiverId)
_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 @@ VCMJitterEstimator::Reset()
_fsCount = 0;
_startupCount = 0;
_rttFilter.Reset();
+ fps_counter_.Reset();
}
void
@@ -297,35 +313,54 @@ VCMJitterEstimator::DeviationFromExpectedDelay(int64_t frameDelayMS,
// 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;
- }
- 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;
+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);
}
+ }
+
+ 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 @@ VCMJitterEstimator::UpdateMaxFrameSize(uint32_t frameSizeBytes)
// 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 dda8f8da..ec7e35ce 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 @@ protected:
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 @@ private:
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 @@ private:
// 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 00000000..5f347505
--- /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/timing.h b/modules/video_coding/main/source/timing.h
index 116639eb..bb44a93b 100644
--- a/modules/video_coding/main/source/timing.h
+++ b/modules/video_coding/main/source/timing.h
@@ -11,9 +11,9 @@
#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/system_wrappers/interface/thread_annotations.h"
#include "webrtc/typedefs.h"
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 5b93a656..d566731b 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 @@ class VideoCodingModuleImpl : public VideoCodingModule {
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 @@ class VideoCodingModuleImpl : public VideoCodingModule {
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 @@ class VideoCodingModuleImpl : public VideoCodingModule {
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 @@ class VideoCodingModuleImpl : public VideoCodingModule {
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 @@ class VideoCodingModuleImpl : public VideoCodingModule {
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 @@ class VideoCodingModuleImpl : public VideoCodingModule {
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 @@ class VideoCodingModuleImpl : public VideoCodingModule {
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 816552fe..5b3fe2eb 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"
@@ -25,7 +26,6 @@
#include "webrtc/modules/video_coding/main/source/timing.h"
#include "webrtc/system_wrappers/interface/clock.h"
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
-#include "webrtc/system_wrappers/interface/thread_annotations.h"
namespace webrtc {
diff --git a/modules/video_coding/main/source/video_coding_test.gypi b/modules/video_coding/main/source/video_coding_test.gypi
index 576524d1..64cb6024 100644
--- a/modules/video_coding/main/source/video_coding_test.gypi
+++ b/modules/video_coding/main/source/video_coding_test.gypi
@@ -44,8 +44,8 @@
'../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/quality_modes_test.cc',
'../test/rtp_player.cc',
@@ -53,8 +53,8 @@
'../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_sender_unittest.cc b/modules/video_coding/main/source/video_sender_unittest.cc
index 0b8193b2..6bc8b80d 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 @@ MATCHER_P(MatchesVp8StreamInfo, expected, "") {
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 @@ class PacketizationCallback : public VCMPacketizationCallback {
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;
@@ -172,7 +175,7 @@ class TestVideoSender : public ::testing::Test {
// 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 @@ class TestVideoSenderWithMockEncoder : public TestVideoSender {
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 @@ class TestVideoSenderWithMockEncoder : public TestVideoSender {
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 @@ class TestVideoSenderWithVp8 : public TestVideoSender {
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/normal_test.h b/modules/video_coding/main/test/normal_test.h
index 28a37c45..63e66b32 100644
--- a/modules/video_coding/main/test/normal_test.h
+++ b/modules/video_coding/main/test/normal_test.h
@@ -32,15 +32,15 @@ class VCMNTEncodeCompleteCallback : public webrtc::VCMPacketizationCallback
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 @@ public:
_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/receiver_tests.h b/modules/video_coding/main/test/receiver_tests.h
index ca276e9c..91b7f8e5 100644
--- a/modules/video_coding/main/test/receiver_tests.h
+++ b/modules/video_coding/main/test/receiver_tests.h
@@ -30,7 +30,7 @@ class RtpDataCallback : public webrtc::NullRtpData {
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/vcm_payload_sink_factory.cc b/modules/video_coding/main/test/vcm_payload_sink_factory.cc
index ebd6f054..aa636a08 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 @@ class VcmPayloadSinkFactory::VcmPayloadSink
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 4af007c6..00000000
--- 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/quality_scaler.cc b/modules/video_coding/utility/quality_scaler.cc
new file mode 100644
index 00000000..327748d2
--- /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 00000000..47d6cb1c
--- /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 00000000..381b959c
--- /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 2f0202b1..dc2b33f2 100644
--- a/modules/video_coding/utility/video_coding_utility.gyp
+++ b/modules/video_coding/utility/video_coding_utility.gyp
@@ -18,8 +18,10 @@
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
],
'sources': [
- 'include/frame_dropper.h',
'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 c10cdf76..1cb2cfb7 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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,7 +23,8 @@ 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/frame_dropper.cc \
+ third_party/webrtc/modules/video_coding/utility/quality_scaler.cc
# Flags passed to both C and C++ files.
@@ -32,7 +32,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -46,13 +45,13 @@ MY_CFLAGS_Debug := \
-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 +66,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +90,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +137,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -151,7 +155,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -165,13 +168,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -209,12 +212,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +260,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -272,50 +279,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 15d7235a..c73d7f3c 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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,14 +23,14 @@ 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/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 \
@@ -57,6 +56,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -79,12 +79,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +123,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -135,7 +139,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -183,12 +186,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -225,6 +231,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -242,42 +249,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 47806272..d1079978 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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,7 +23,8 @@ 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/frame_dropper.cc \
+ third_party/webrtc/modules/video_coding/utility/quality_scaler.cc
# Flags passed to both C and C++ files.
@@ -32,7 +32,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -46,8 +45,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -62,6 +59,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -85,12 +83,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +129,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +147,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -159,8 +160,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -198,12 +197,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +244,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -260,46 +263,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/video_coding/utility/video_coding_utility.target.darwin-x86.mk
index 7ddf8c01..ab9cdf17 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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,14 +23,14 @@ 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/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 \
@@ -62,6 +61,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -85,12 +85,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +129,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -141,7 +145,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -195,12 +198,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +243,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -254,46 +261,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 78aa52fb..cec9a471 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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,7 +23,8 @@ 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/frame_dropper.cc \
+ third_party/webrtc/modules/video_coding/utility/quality_scaler.cc
# Flags passed to both C and C++ files.
@@ -32,7 +32,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,6 +60,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -84,12 +84,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +128,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -141,7 +145,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -193,12 +196,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +241,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -252,46 +259,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 c10cdf76..1cb2cfb7 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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,7 +23,8 @@ 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/frame_dropper.cc \
+ third_party/webrtc/modules/video_coding/utility/quality_scaler.cc
# Flags passed to both C and C++ files.
@@ -32,7 +32,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -46,13 +45,13 @@ MY_CFLAGS_Debug := \
-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 +66,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +90,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +137,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -151,7 +155,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -165,13 +168,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -209,12 +212,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +260,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -272,50 +279,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 15d7235a..c73d7f3c 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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,14 +23,14 @@ 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/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 \
@@ -57,6 +56,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -79,12 +79,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +123,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -135,7 +139,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -183,12 +186,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -225,6 +231,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -242,42 +249,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 47806272..d1079978 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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,7 +23,8 @@ 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/frame_dropper.cc \
+ third_party/webrtc/modules/video_coding/utility/quality_scaler.cc
# Flags passed to both C and C++ files.
@@ -32,7 +32,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -46,8 +45,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -62,6 +59,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -85,12 +83,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +129,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +147,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -159,8 +160,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -198,12 +197,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +244,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -260,46 +263,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/video_coding/utility/video_coding_utility.target.linux-x86.mk
index 7ddf8c01..ab9cdf17 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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,14 +23,14 @@ 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/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 \
@@ -62,6 +61,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -85,12 +85,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +129,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -141,7 +145,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -195,12 +198,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +243,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -254,46 +261,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 78aa52fb..cec9a471 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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,7 +23,8 @@ 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/frame_dropper.cc \
+ third_party/webrtc/modules/video_coding/utility/quality_scaler.cc
# Flags passed to both C and C++ files.
@@ -32,7 +32,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,6 +60,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -84,12 +84,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +128,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -141,7 +145,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -193,12 +196,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +241,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -252,46 +259,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 091af461..2263f3ab 100644
--- a/modules/video_processing.target.darwin-arm.mk
+++ b/modules/video_processing.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -40,7 +39,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -58,13 +56,13 @@ MY_CFLAGS_Debug := \
-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 \
@@ -79,6 +77,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -102,12 +101,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -151,6 +153,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -168,7 +171,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -186,13 +188,13 @@ MY_CFLAGS_Release := \
-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,12 +232,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +285,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -298,50 +304,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 7542b69a..6839bff3 100644
--- a/modules/video_processing.target.darwin-arm64.mk
+++ b/modules/video_processing.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -39,7 +38,6 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -69,6 +67,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -91,12 +90,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +139,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -152,7 +155,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,12 +206,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +256,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -268,42 +274,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 67b1d066..d1b7163b 100644
--- a/modules/video_processing.target.darwin-mips.mk
+++ b/modules/video_processing.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -40,7 +39,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -59,8 +57,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -75,6 +71,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -98,12 +95,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +146,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -163,7 +164,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -182,8 +182,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -221,12 +219,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +271,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -288,46 +290,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/video_processing.target.darwin-x86.mk
index 90015c4a..98d3848c 100644
--- a/modules/video_processing.target.darwin-x86.mk
+++ b/modules/video_processing.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -39,7 +38,6 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -74,6 +72,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -97,12 +96,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +145,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -158,7 +161,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -216,12 +218,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +268,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -280,46 +286,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 c1ab85b7..8368b866 100644
--- a/modules/video_processing.target.darwin-x86_64.mk
+++ b/modules/video_processing.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -40,7 +39,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -73,6 +71,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -96,12 +95,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +144,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -158,7 +161,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -214,12 +216,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -261,6 +266,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -278,46 +284,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 091af461..2263f3ab 100644
--- a/modules/video_processing.target.linux-arm.mk
+++ b/modules/video_processing.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -40,7 +39,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -58,13 +56,13 @@ MY_CFLAGS_Debug := \
-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 \
@@ -79,6 +77,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -102,12 +101,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -151,6 +153,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -168,7 +171,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -186,13 +188,13 @@ MY_CFLAGS_Release := \
-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,12 +232,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +285,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -298,50 +304,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 7542b69a..6839bff3 100644
--- a/modules/video_processing.target.linux-arm64.mk
+++ b/modules/video_processing.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -39,7 +38,6 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -69,6 +67,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -91,12 +90,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +139,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -152,7 +155,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,12 +206,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +256,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -268,42 +274,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 67b1d066..d1b7163b 100644
--- a/modules/video_processing.target.linux-mips.mk
+++ b/modules/video_processing.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -40,7 +39,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -59,8 +57,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -75,6 +71,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -98,12 +95,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +146,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -163,7 +164,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -182,8 +182,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -221,12 +219,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +271,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -288,46 +290,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/video_processing.target.linux-x86.mk
index 90015c4a..98d3848c 100644
--- a/modules/video_processing.target.linux-x86.mk
+++ b/modules/video_processing.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -39,7 +38,6 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -74,6 +72,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -97,12 +96,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +145,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -158,7 +161,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -216,12 +218,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +268,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -280,46 +286,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 c1ab85b7..8368b866 100644
--- a/modules/video_processing.target.linux-x86_64.mk
+++ b/modules/video_processing.target.linux-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -40,7 +39,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -73,6 +71,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -96,12 +95,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +144,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -158,7 +161,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -214,12 +216,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -261,6 +266,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -278,46 +284,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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
index 59bde187..42ef94bf 100644
--- a/modules/video_processing/BUILD.gn
+++ b/modules/video_processing/BUILD.gn
@@ -44,15 +44,25 @@ source_set("video_processing") {
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",
- ]
+ 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
index 037de93f..897a0b28 100644
--- a/modules/video_processing/OWNERS
+++ b/modules/video_processing/OWNERS
@@ -1,5 +1,4 @@
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 4df8812a..df8a3617 100644
--- a/modules/video_processing/main/interface/video_processing.h
+++ b/modules/video_processing/main/interface/video_processing.h
@@ -89,12 +89,12 @@ class VideoProcessingModule : public Module {
/**
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
diff --git a/modules/video_processing/main/source/Android.mk b/modules/video_processing/main/source/Android.mk
deleted file mode 100644
index 62eb3874..00000000
--- a/modules/video_processing/main/source/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_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 \
- 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 cdc61748..95755c22 100644
--- a/modules/video_processing/main/source/deflickering.cc
+++ b/modules/video_processing/main/source/deflickering.cc
@@ -75,8 +75,9 @@ void VPMDeflickering::Reset() {
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 @@ int32_t VPMDeflickering::ProcessFrame(I420VideoFrame* frame,
// 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/video_processing_impl.h b/modules/video_processing/main/source/video_processing_impl.h
index 6fe617d8..95e41bd4 100644
--- a/modules/video_processing/main/source/video_processing_impl.h
+++ b/modules/video_processing/main/source/video_processing_impl.h
@@ -29,43 +29,45 @@ class VideoProcessingModuleImpl : public VideoProcessingModule {
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 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_;
diff --git a/modules/video_processing_sse2.target.darwin-x86.mk b/modules/video_processing_sse2.target.darwin-x86.mk
index 5f5cd12e..ef5499c7 100644
--- a/modules/video_processing_sse2.target.darwin-x86.mk
+++ b/modules/video_processing_sse2.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +132,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,12 +206,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +250,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -262,46 +268,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 7bc07bc5..32d84988 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 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +131,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,12 +204,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -243,6 +248,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -260,46 +266,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 5f5cd12e..ef5499c7 100644
--- a/modules/video_processing_sse2.target.linux-x86.mk
+++ b/modules/video_processing_sse2.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +132,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -204,12 +206,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +250,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -262,46 +268,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 7bc07bc5..32d84988 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 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +131,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,12 +204,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -243,6 +248,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -260,46 +266,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 c11a89c0..00000000
--- 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
index c569b7fa..84b73c58 100644
--- a/modules/video_render/BUILD.gn
+++ b/modules/video_render/BUILD.gn
@@ -9,5 +9,157 @@
import("../../build/webrtc.gni")
source_set("video_render") {
- # TODO(wuchengli): Implement.
+ 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 71d24677..608a7015 100644
--- a/modules/video_render/OWNERS
+++ b/modules/video_render/OWNERS
@@ -1,9 +1,7 @@
-fischman@webrtc.org
mallinath@webrtc.org
mflodman@webrtc.org
perkj@webrtc.org
tkchin@webrtc.org
-wu@webrtc.org
per-file *.isolate=kjellander@webrtc.org
diff --git a/modules/video_render/android/OWNERS b/modules/video_render/android/OWNERS
deleted file mode 100644
index 6ba5af0b..00000000
--- 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 27a264ac..20694b65 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 @@ namespace webrtc {
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 881e0f98..53a40414 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 @@ public:
*
* 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 e86bab14..31f6b640 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 19dcdebc..86320bee 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 5c3d6fa7..bdab72bd 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 2faca657..933ee3b4 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 41817186..3ec68ddb 100644
--- a/modules/video_render/test/testAPI/testAPI.cc
+++ b/modules/video_render/test/testAPI/testAPI.cc
@@ -294,11 +294,6 @@ int TestSingleStream(VideoRender* renderModule) {
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 @@ int TestExternalRender(VideoRender* renderModule) {
}
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 71d969ba..5db851d9 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 763590f2..db0dd5ae 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 @@ VideoRender::CreateVideoRender(const int32_t id,
VideoRenderType resultVideoRenderType = videoRenderType;
if (videoRenderType == kRenderDefault)
{
- resultVideoRenderType = STANDARD_RENDERING;
+ resultVideoRenderType = kRenderExternal;
}
return new ModuleVideoRenderImpl(id, resultVideoRenderType, window,
fullscreen);
@@ -98,97 +57,6 @@ ModuleVideoRenderImpl::ModuleVideoRenderImpl(
// 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 @@ ModuleVideoRenderImpl::~ModuleVideoRenderImpl()
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 @@ ModuleVideoRenderImpl::Window()
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 00000000..0508c1a7
--- /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 00000000..106a3754
--- /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_module.target.darwin-arm.mk b/modules/video_render_module.target.darwin-arm.mk
index dfa791f5..a28660ff 100644
--- a/modules/video_render_module.target.darwin-arm.mk
+++ b/modules/video_render_module.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ 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 \
- 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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -53,13 +50,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -97,12 +95,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +144,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -160,7 +162,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -178,13 +179,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -222,12 +223,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +273,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -287,50 +292,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 733bb13e..5e28bd8d 100644
--- a/modules/video_render_module.target.darwin-arm64.mk
+++ b/modules/video_render_module.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ 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 \
- 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,6 +61,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -86,12 +84,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +130,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -144,7 +146,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -196,12 +197,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +244,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -257,42 +262,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 fd181e71..d4cf3822 100644
--- a/modules/video_render_module.target.darwin-mips.mk
+++ b/modules/video_render_module.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ 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 \
- 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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -54,8 +51,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -70,6 +65,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -93,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -138,6 +137,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -155,7 +155,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -174,8 +173,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -213,12 +210,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +259,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -277,46 +278,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/video_render_module.target.darwin-x86.mk
index f719bf4e..4dd6fbd5 100644
--- a/modules/video_render_module.target.darwin-x86.mk
+++ b/modules/video_render_module.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ 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 \
- 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 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -92,12 +90,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +136,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +152,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -208,12 +209,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +256,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -269,46 +274,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 cd1b01c8..13566180 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 @@ include $(CLEAR_VARS)
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 @@ 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 \
- 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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -68,6 +65,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -91,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +135,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +152,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -206,12 +207,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +254,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -267,46 +272,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 dfa791f5..a28660ff 100644
--- a/modules/video_render_module.target.linux-arm.mk
+++ b/modules/video_render_module.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ 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 \
- 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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -53,13 +50,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -97,12 +95,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +144,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -160,7 +162,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -178,13 +179,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -222,12 +223,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +273,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -287,50 +292,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 733bb13e..5e28bd8d 100644
--- a/modules/video_render_module.target.linux-arm64.mk
+++ b/modules/video_render_module.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ 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 \
- 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,6 +61,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -86,12 +84,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +130,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -144,7 +146,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -196,12 +197,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +244,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -257,42 +262,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 fd181e71..d4cf3822 100644
--- a/modules/video_render_module.target.linux-mips.mk
+++ b/modules/video_render_module.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ 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 \
- 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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -54,8 +51,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -70,6 +65,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -93,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -138,6 +137,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -155,7 +155,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -174,8 +173,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -213,12 +210,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +259,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -277,46 +278,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/video_render_module.target.linux-x86.mk
index f719bf4e..4dd6fbd5 100644
--- a/modules/video_render_module.target.linux-x86.mk
+++ b/modules/video_render_module.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ 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 \
- 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 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -92,12 +90,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +136,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +152,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -208,12 +209,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +256,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -269,46 +274,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 cd1b01c8..13566180 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 @@ include $(CLEAR_VARS)
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 @@ 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 \
- 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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -68,6 +65,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -91,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +135,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +152,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -206,12 +207,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +254,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -267,46 +272,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 00000000..73e1f915
--- /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 00000000..a538bcc3
--- /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 00000000..f4a67f00
--- /dev/null
+++ b/modules/video_render_module_impl.target.darwin-mips.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_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 \
+ -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 \
+ -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' \
+ '-DMIPS32_LE' \
+ '-DMIPS_FPU_LE' \
+ '-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 \
+ -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 \
+ -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' \
+ '-DMIPS32_LE' \
+ '-DMIPS_FPU_LE' \
+ '-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 00000000..501d5f41
--- /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 00000000..719da3e1
--- /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 00000000..73e1f915
--- /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 00000000..a538bcc3
--- /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 00000000..f4a67f00
--- /dev/null
+++ b/modules/video_render_module_impl.target.linux-mips.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_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 \
+ -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 \
+ -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' \
+ '-DMIPS32_LE' \
+ '-DMIPS_FPU_LE' \
+ '-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 \
+ -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 \
+ -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' \
+ '-DMIPS32_LE' \
+ '-DMIPS_FPU_LE' \
+ '-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 00000000..501d5f41
--- /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 00000000..719da3e1
--- /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 3f0265d8..eb597c46 100644
--- a/modules/webrtc_i420.target.darwin-arm.mk
+++ b/modules/webrtc_i420.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -94,12 +93,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -138,6 +140,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -155,7 +158,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,13 +175,13 @@ MY_CFLAGS_Release := \
-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,12 +219,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +267,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -280,50 +286,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 01fc888a..fd54f8e0 100644
--- a/modules/webrtc_i420.target.darwin-arm64.mk
+++ b/modules/webrtc_i420.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,6 +59,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -83,12 +82,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +126,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -139,7 +142,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -191,12 +193,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +238,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -250,42 +256,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 d90c6635..649b0156 100644
--- a/modules/webrtc_i420.target.darwin-mips.mk
+++ b/modules/webrtc_i420.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -51,8 +49,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -67,6 +63,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +133,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +151,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -169,8 +169,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -208,12 +206,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +253,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -270,46 +272,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/webrtc_i420.target.darwin-x86.mk
index c60e3f82..b0c0cf38 100644
--- a/modules/webrtc_i420.target.darwin-x86.mk
+++ b/modules/webrtc_i420.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +132,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -203,12 +205,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +250,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -262,46 +268,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 5f7c0516..4a64b23a 100644
--- a/modules/webrtc_i420.target.darwin-x86_64.mk
+++ b/modules/webrtc_i420.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -88,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +131,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -201,12 +203,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -243,6 +248,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -260,46 +266,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 3f0265d8..eb597c46 100644
--- a/modules/webrtc_i420.target.linux-arm.mk
+++ b/modules/webrtc_i420.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,13 +48,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -94,12 +93,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -138,6 +140,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -155,7 +158,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,13 +175,13 @@ MY_CFLAGS_Release := \
-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,12 +219,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +267,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -280,50 +286,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 01fc888a..fd54f8e0 100644
--- a/modules/webrtc_i420.target.linux-arm64.mk
+++ b/modules/webrtc_i420.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,6 +59,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -83,12 +82,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +126,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -139,7 +142,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -191,12 +193,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +238,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -250,42 +256,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 d90c6635..649b0156 100644
--- a/modules/webrtc_i420.target.linux-mips.mk
+++ b/modules/webrtc_i420.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -51,8 +49,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -67,6 +63,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +133,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +151,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -169,8 +169,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -208,12 +206,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +253,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -270,46 +272,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/webrtc_i420.target.linux-x86.mk
index c60e3f82..b0c0cf38 100644
--- a/modules/webrtc_i420.target.linux-x86.mk
+++ b/modules/webrtc_i420.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -66,6 +64,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +132,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -203,12 +205,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +250,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -262,46 +268,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 5f7c0516..4a64b23a 100644
--- a/modules/webrtc_i420.target.linux-x86_64.mk
+++ b/modules/webrtc_i420.target.linux-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -88,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +131,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -201,12 +203,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -243,6 +248,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -260,46 +266,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 bb47a46e..c0e7b3f7 100644
--- a/modules/webrtc_opus.target.darwin-arm.mk
+++ b/modules/webrtc_opus.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -49,13 +47,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -93,12 +92,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -138,6 +140,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -155,7 +158,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,13 +175,13 @@ MY_CFLAGS_Release := \
-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,12 +219,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +268,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -281,50 +287,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 ea2794f5..57048848 100644
--- a/modules/webrtc_opus.target.darwin-arm64.mk
+++ b/modules/webrtc_opus.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -60,6 +58,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -82,12 +81,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +126,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -139,7 +142,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -191,12 +193,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +239,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -251,42 +257,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 af52b1a1..b422f2f6 100644
--- a/modules/webrtc_opus.target.darwin-mips.mk
+++ b/modules/webrtc_opus.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,8 +48,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -66,6 +62,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +86,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +133,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +151,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -169,8 +169,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -208,12 +206,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +254,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -271,46 +273,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/webrtc_opus.target.darwin-x86.mk
index 477442c9..49685518 100644
--- a/modules/webrtc_opus.target.darwin-x86.mk
+++ b/modules/webrtc_opus.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -88,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +132,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -203,12 +205,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +251,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -263,46 +269,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 df26c880..b01b4bf6 100644
--- a/modules/webrtc_opus.target.darwin-x86_64.mk
+++ b/modules/webrtc_opus.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -64,6 +62,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -87,12 +86,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +131,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -201,12 +203,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +249,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -261,46 +267,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 bb47a46e..c0e7b3f7 100644
--- a/modules/webrtc_opus.target.linux-arm.mk
+++ b/modules/webrtc_opus.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -49,13 +47,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -93,12 +92,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -138,6 +140,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -155,7 +158,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -173,13 +175,13 @@ MY_CFLAGS_Release := \
-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,12 +219,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +268,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -281,50 +287,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 ea2794f5..57048848 100644
--- a/modules/webrtc_opus.target.linux-arm64.mk
+++ b/modules/webrtc_opus.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -60,6 +58,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -82,12 +81,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +126,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -139,7 +142,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -191,12 +193,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +239,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -251,42 +257,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 af52b1a1..b422f2f6 100644
--- a/modules/webrtc_opus.target.linux-mips.mk
+++ b/modules/webrtc_opus.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -50,8 +48,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -66,6 +62,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +86,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +133,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +151,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -169,8 +169,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -208,12 +206,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +254,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -271,46 +273,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/webrtc_opus.target.linux-x86.mk
index 477442c9..49685518 100644
--- a/modules/webrtc_opus.target.linux-x86.mk
+++ b/modules/webrtc_opus.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -65,6 +63,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -88,12 +87,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +132,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -203,12 +205,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +251,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -263,46 +269,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 df26c880..b01b4bf6 100644
--- a/modules/webrtc_opus.target.linux-x86_64.mk
+++ b/modules/webrtc_opus.target.linux-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -64,6 +62,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -87,12 +86,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +131,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -145,7 +148,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -201,12 +203,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +249,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -261,46 +267,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 16553b50..36b785be 100644
--- a/modules/webrtc_utility.target.darwin-arm.mk
+++ b/modules/webrtc_utility.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -59,13 +57,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -103,12 +102,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +156,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -171,7 +174,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -189,13 +191,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -233,12 +235,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -285,6 +290,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -303,50 +309,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 41f777b8..b3d5d7a7 100644
--- a/modules/webrtc_utility.target.darwin-arm64.mk
+++ b/modules/webrtc_utility.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -70,6 +68,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -92,12 +91,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +142,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -155,7 +158,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -207,12 +209,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +261,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -273,42 +279,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 5153a5c7..0e9f0d2d 100644
--- a/modules/webrtc_utility.target.darwin-mips.mk
+++ b/modules/webrtc_utility.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -60,8 +58,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -76,6 +72,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -99,12 +96,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +149,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -166,7 +167,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -185,8 +185,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -224,12 +222,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +276,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -293,46 +295,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/webrtc_utility.target.darwin-x86.mk
index 6aa62932..74fcce2e 100644
--- a/modules/webrtc_utility.target.darwin-x86.mk
+++ b/modules/webrtc_utility.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -75,6 +73,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -98,12 +97,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +148,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -161,7 +164,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -219,12 +221,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +273,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -285,46 +291,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 0d9a5525..7c680a79 100644
--- a/modules/webrtc_utility.target.darwin-x86_64.mk
+++ b/modules/webrtc_utility.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -74,6 +72,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -97,12 +96,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +147,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -161,7 +164,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -217,12 +219,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +271,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -283,46 +289,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 16553b50..36b785be 100644
--- a/modules/webrtc_utility.target.linux-arm.mk
+++ b/modules/webrtc_utility.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -59,13 +57,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -103,12 +102,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +156,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -171,7 +174,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -189,13 +191,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -233,12 +235,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -285,6 +290,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -303,50 +309,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 41f777b8..b3d5d7a7 100644
--- a/modules/webrtc_utility.target.linux-arm64.mk
+++ b/modules/webrtc_utility.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -70,6 +68,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -92,12 +91,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +142,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -155,7 +158,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -207,12 +209,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +261,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -273,42 +279,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 5153a5c7..0e9f0d2d 100644
--- a/modules/webrtc_utility.target.linux-mips.mk
+++ b/modules/webrtc_utility.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -60,8 +58,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -76,6 +72,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -99,12 +96,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +149,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -166,7 +167,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -185,8 +185,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -224,12 +222,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +276,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -293,46 +295,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/webrtc_utility.target.linux-x86.mk
index 6aa62932..74fcce2e 100644
--- a/modules/webrtc_utility.target.linux-x86.mk
+++ b/modules/webrtc_utility.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -75,6 +73,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -98,12 +97,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +148,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -161,7 +164,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -219,12 +221,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +273,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -285,46 +291,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 0d9a5525..7c680a79 100644
--- a/modules/webrtc_utility.target.linux-x86_64.mk
+++ b/modules/webrtc_utility.target.linux-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -74,6 +72,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -97,12 +96,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +147,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -161,7 +164,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -217,12 +219,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +271,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -283,46 +289,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 bac00830..07b42b9d 100644
--- a/modules/webrtc_video_coding.target.darwin-arm.mk
+++ b/modules/webrtc_video_coding.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -72,13 +70,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -116,12 +115,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +164,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -179,7 +182,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -197,13 +199,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -241,12 +243,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +293,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -306,50 +312,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 33f3ce7d..013dc1f3 100644
--- a/modules/webrtc_video_coding.target.darwin-arm64.mk
+++ b/modules/webrtc_video_coding.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -83,6 +81,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -105,12 +104,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +150,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -163,7 +166,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -215,12 +217,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +264,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -276,42 +282,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 986afbe5..48f5dd24 100644
--- a/modules/webrtc_video_coding.target.darwin-mips.mk
+++ b/modules/webrtc_video_coding.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -73,8 +71,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -89,6 +85,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -112,12 +109,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +157,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -174,7 +175,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -193,8 +193,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -232,12 +230,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +279,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -296,46 +298,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/webrtc_video_coding.target.darwin-x86.mk
index 22852f00..af51da96 100644
--- a/modules/webrtc_video_coding.target.darwin-x86.mk
+++ b/modules/webrtc_video_coding.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -88,6 +86,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -111,12 +110,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +156,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -169,7 +172,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -227,12 +229,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +276,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -288,46 +294,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 a8c00ac7..db0b6c7f 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 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -87,6 +85,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -110,12 +109,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +155,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -169,7 +172,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -225,12 +227,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +274,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -286,46 +292,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 bac00830..07b42b9d 100644
--- a/modules/webrtc_video_coding.target.linux-arm.mk
+++ b/modules/webrtc_video_coding.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -72,13 +70,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -116,12 +115,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +164,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -179,7 +182,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -197,13 +199,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -241,12 +243,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +293,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -306,50 +312,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 33f3ce7d..013dc1f3 100644
--- a/modules/webrtc_video_coding.target.linux-arm64.mk
+++ b/modules/webrtc_video_coding.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -83,6 +81,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -105,12 +104,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +150,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -163,7 +166,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -215,12 +217,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +264,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -276,42 +282,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 986afbe5..48f5dd24 100644
--- a/modules/webrtc_video_coding.target.linux-mips.mk
+++ b/modules/webrtc_video_coding.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -73,8 +71,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -89,6 +85,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -112,12 +109,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +157,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -174,7 +175,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -193,8 +193,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -232,12 +230,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +279,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -296,46 +298,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/modules/webrtc_video_coding.target.linux-x86.mk
index 22852f00..af51da96 100644
--- a/modules/webrtc_video_coding.target.linux-x86.mk
+++ b/modules/webrtc_video_coding.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -88,6 +86,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -111,12 +110,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +156,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -169,7 +172,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -227,12 +229,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +276,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -288,46 +294,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 a8c00ac7..db0b6c7f 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 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -87,6 +85,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -110,12 +109,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +155,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -169,7 +172,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -225,12 +227,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +274,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -286,46 +292,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 00000000..1a24a6a8
--- /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 bb89f91f..72b334c1 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 f0c79106..a2ffba65 100644
--- a/overrides/webrtc/base/logging.cc
+++ b/overrides/webrtc/base/logging.cc
@@ -164,6 +164,11 @@ DiagnosticLogMessage::~DiagnosticLogMessage() {
}
}
+// 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 d8dfca2c..d9e0a355 100644
--- a/overrides/webrtc/base/logging.h
+++ b/overrides/webrtc/base/logging.h
@@ -150,6 +150,11 @@ class LogMultilineState {
}
};
+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 00000000..c4325dfb
--- /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 00000000..c2be190d
--- /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 &params) {
+ return OpenDevice<SoundOutputStreamInterface>(
+ device,
+ params,
+ SND_PCM_STREAM_PLAYBACK,
+ &AlsaSoundSystem::StartOutputStream);
+}
+
+SoundInputStreamInterface *AlsaSoundSystem::OpenCaptureDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams &params) {
+ 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 &params) {
+ 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 &params,
+ 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 00000000..f95e6861
--- /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 &params);
+ virtual SoundInputStreamInterface *OpenCaptureDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams &params);
+
+ 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 &params);
+
+ template <typename StreamInterface>
+ StreamInterface *OpenDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams &params,
+ 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 00000000..0670fb23
--- /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 00000000..2cc8dba0
--- /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 00000000..84ff717a
--- /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 00000000..5cfd7c6f
--- /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 00000000..c420ab57
--- /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 00000000..0016f8a4
--- /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 00000000..962f4105
--- /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 &params) {
+ return new NullSoundOutputStream();
+}
+
+SoundInputStreamInterface *NullSoundSystem::OpenCaptureDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams &params) {
+ 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 00000000..6b749976
--- /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 &params);
+ virtual SoundInputStreamInterface *OpenCaptureDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams &params);
+
+ 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 00000000..f35b6e74
--- /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 00000000..8bdb4639
--- /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 00000000..e4d71025
--- /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 00000000..40eff264
--- /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 00000000..a2292368
--- /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 00000000..c5105ef0
--- /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 00000000..e063e177
--- /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 &params) {
+ return OpenDevice<SoundOutputStreamInterface>(
+ device,
+ params,
+ "Playback",
+ &PulseAudioSoundSystem::ConnectOutputStream);
+}
+
+SoundInputStreamInterface *PulseAudioSoundSystem::OpenCaptureDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams &params) {
+ 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 &params,
+ 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 00000000..4e67acc0
--- /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 &params);
+ virtual SoundInputStreamInterface *OpenCaptureDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams &params);
+
+ 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 &params,
+ 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 00000000..7dd073f8
--- /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 00000000..35e95236
--- /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 00000000..38a2acb1
--- /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 00000000..a7d929b2
--- /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 00000000..3fe3574c
--- /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 00000000..4e8e1485
--- /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 00000000..6ce9446d
--- /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 00000000..2b501d65
--- /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 00000000..b86246cb
--- /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 00000000..f1ee5a9a
--- /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 00000000..aa9a53a9
--- /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 &params) = 0;
+ virtual SoundInputStreamInterface *OpenCaptureDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams &params) = 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 00000000..e26a6bd3
--- /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 &params) {
+ return wrapped_ ? wrapped_->OpenPlaybackDevice(device, params) : NULL;
+}
+
+SoundInputStreamInterface *SoundSystemProxy::OpenCaptureDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams &params) {
+ return wrapped_ ? wrapped_->OpenCaptureDevice(device, params) : NULL;
+}
+
+} // namespace rtc
diff --git a/sound/soundsystemproxy.h b/sound/soundsystemproxy.h
new file mode 100644
index 00000000..d13cf15b
--- /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 &params);
+ virtual SoundInputStreamInterface *OpenCaptureDevice(
+ const SoundDeviceLocator *device,
+ const OpenParams &params);
+
+ protected:
+ SoundSystemInterface *wrapped_;
+};
+
+} // namespace rtc
+
+#endif // WEBRTC_SOUND_SOUNDSYSTEMPROXY_H_
diff --git a/supplement.gypi b/supplement.gypi
index 0a10cbc2..4bf85987 100644
--- a/supplement.gypi
+++ b/supplement.gypi
@@ -5,17 +5,20 @@
},
'webrtc_root%': '<(webrtc_root)',
'build_with_chromium': 0,
- 'use_sanitizer_options': 0,
},
'target_defaults': {
- 'conditions': [
- # Add default sanitizer options similar to Chromium. This cannot be
- # put in webrtc/build/common.gypi since that file is not included by
- # third party code (yasm will throw leak errors during compile when
- # GYP_DEFINES="asan=1".
- ['OS=="linux" and (chromeos==0 or target_arch!="ia32")', {
- 'dependencies': [
- '<(webrtc_root)/build/sanitizer_options.gyp:sanitizer_options',
+ '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
index e4165133..262189c1 100644
--- a/system_wrappers/BUILD.gn
+++ b/system_wrappers/BUILD.gn
@@ -45,7 +45,6 @@ static_library("system_wrappers") {
"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",
@@ -108,12 +107,18 @@ static_library("system_wrappers") {
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 (enable_data_logging) {
+ if (rtc_enable_data_logging) {
sources += [ "source/data_log.cc" ]
} else {
sources += [ "source/data_log_no_op.cc" ]
@@ -187,7 +192,7 @@ static_library("system_wrappers") {
]
deps += [
- "../base:webrtc_base",
+ "../base:rtc_base_approved",
]
}
@@ -195,6 +200,13 @@ 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",
]
diff --git a/system_wrappers/OWNERS b/system_wrappers/OWNERS
index d292dfdb..14637b1e 100644
--- a/system_wrappers/OWNERS
+++ b/system_wrappers/OWNERS
@@ -1,5 +1,4 @@
henrike@webrtc.org
-pwestin@webrtc.org
perkj@webrtc.org
henrika@webrtc.org
henrikg@webrtc.org
diff --git a/system_wrappers/interface/critical_section_wrapper.h b/system_wrappers/interface/critical_section_wrapper.h
index 4979b5c7..e93a249e 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 91126e5d..dbe6d6c7 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 4767e72c..00000000
--- 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/cpu_features_android.target.darwin-arm.mk b/system_wrappers/source/cpu_features_android.target.darwin-arm.mk
index 50c80b08..c05b9f57 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -45,13 +43,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +134,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -149,7 +152,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -163,13 +165,13 @@ MY_CFLAGS_Release := \
-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,12 +209,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +256,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -269,45 +275,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 d9d49d89..a0dd964d 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -56,6 +54,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -78,12 +77,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -118,6 +120,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -133,7 +136,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -181,12 +183,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -222,6 +227,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -239,37 +245,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 7b2a7bee..4c2ee798 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -45,8 +43,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -61,6 +57,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -84,12 +81,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +126,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -143,7 +144,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -157,8 +157,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -196,12 +194,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +240,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -257,41 +259,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/system_wrappers/source/cpu_features_android.target.darwin-x86.mk
index 5c9e4f6b..ddce1658 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,6 +59,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -84,12 +83,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +126,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -139,7 +142,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -193,12 +195,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +239,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -251,41 +257,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 f6ac7479..78fe2b81 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -60,6 +58,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -83,12 +82,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +125,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -139,7 +142,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -191,12 +193,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -232,6 +237,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -249,41 +255,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 50c80b08..c05b9f57 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -45,13 +43,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -89,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +134,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -149,7 +152,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -163,13 +165,13 @@ MY_CFLAGS_Release := \
-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,12 +209,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +256,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -269,45 +275,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 d9d49d89..a0dd964d 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -56,6 +54,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -78,12 +77,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -118,6 +120,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -133,7 +136,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -181,12 +183,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -222,6 +227,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -239,37 +245,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 7b2a7bee..4c2ee798 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -45,8 +43,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -61,6 +57,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -84,12 +81,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +126,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -143,7 +144,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -157,8 +157,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -196,12 +194,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +240,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -257,41 +259,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/system_wrappers/source/cpu_features_android.target.linux-x86.mk
index 5c9e4f6b..ddce1658 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,6 +59,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -84,12 +83,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +126,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -139,7 +142,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -193,12 +195,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +239,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -251,41 +257,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 f6ac7479..78fe2b81 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -60,6 +58,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -83,12 +82,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +125,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -139,7 +142,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -191,12 +193,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -232,6 +237,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -249,41 +255,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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/system_wrappers.gyp b/system_wrappers/source/system_wrappers.gyp
index 66b34356..e6c4216d 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 72d2c6ce..b45148b6 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -74,13 +72,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -118,12 +117,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,12 +138,6 @@ MY_DEFS_Debug := \
'-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' \
@@ -171,6 +167,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -188,7 +185,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,13 +198,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -246,12 +242,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,12 +263,6 @@ MY_DEFS_Release := \
'-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' \
@@ -300,6 +293,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -318,50 +312,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 16e3db18..ffaa2f90 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -85,6 +83,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -107,12 +106,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,12 +124,6 @@ MY_DEFS_Debug := \
'-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' \
@@ -157,6 +153,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -172,7 +169,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -220,12 +216,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,12 +234,6 @@ MY_DEFS_Release := \
'-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' \
@@ -271,6 +264,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -288,42 +282,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 00f6a5ac..89e11788 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -74,8 +72,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -90,6 +86,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -113,12 +110,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,12 +130,6 @@ MY_DEFS_Debug := \
'-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' \
@@ -165,6 +159,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -182,7 +177,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -196,8 +190,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -235,12 +227,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,12 +247,6 @@ MY_DEFS_Release := \
'-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' \
@@ -288,6 +277,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -306,46 +296,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/system_wrappers/source/system_wrappers.target.darwin-x86.mk
index 2312fb8a..5531fb5f 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -90,6 +88,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -113,12 +112,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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 +130,6 @@ MY_DEFS_Debug := \
'-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,6 +159,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -178,7 +175,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -232,12 +228,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,12 +246,6 @@ MY_DEFS_Release := \
'-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' \
@@ -283,6 +276,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -300,46 +294,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 4cd31a47..55456076 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -89,6 +87,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -112,12 +111,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,12 +129,6 @@ MY_DEFS_Debug := \
'-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' \
@@ -162,6 +158,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -178,7 +175,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -230,12 +226,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,12 +244,6 @@ MY_DEFS_Release := \
'-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' \
@@ -281,6 +274,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -298,46 +292,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 72d2c6ce..b45148b6 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -74,13 +72,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -118,12 +117,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,12 +138,6 @@ MY_DEFS_Debug := \
'-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' \
@@ -171,6 +167,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -188,7 +185,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -202,13 +198,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -246,12 +242,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,12 +263,6 @@ MY_DEFS_Release := \
'-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' \
@@ -300,6 +293,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -318,50 +312,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 16e3db18..ffaa2f90 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -85,6 +83,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -107,12 +106,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,12 +124,6 @@ MY_DEFS_Debug := \
'-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' \
@@ -157,6 +153,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -172,7 +169,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -220,12 +216,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,12 +234,6 @@ MY_DEFS_Release := \
'-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' \
@@ -271,6 +264,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -288,42 +282,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 00f6a5ac..89e11788 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -74,8 +72,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -90,6 +86,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -113,12 +110,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,12 +130,6 @@ MY_DEFS_Debug := \
'-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' \
@@ -165,6 +159,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -182,7 +177,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -196,8 +190,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -235,12 +227,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,12 +247,6 @@ MY_DEFS_Release := \
'-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' \
@@ -288,6 +277,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -306,46 +296,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/system_wrappers/source/system_wrappers.target.linux-x86.mk
index 2312fb8a..5531fb5f 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -90,6 +88,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -113,12 +112,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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 +130,6 @@ MY_DEFS_Debug := \
'-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,6 +159,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -178,7 +175,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -232,12 +228,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,12 +246,6 @@ MY_DEFS_Release := \
'-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' \
@@ -283,6 +276,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -300,46 +294,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 4cd31a47..55456076 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -89,6 +87,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -112,12 +111,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,12 +129,6 @@ MY_DEFS_Debug := \
'-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' \
@@ -162,6 +158,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -178,7 +175,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -230,12 +226,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,12 +244,6 @@ MY_DEFS_Release := \
'-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' \
@@ -281,6 +274,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -298,46 +292,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 3d08c0d0..75081b9d 100644
--- a/system_wrappers/source/system_wrappers_tests.gyp
+++ b/system_wrappers/source/system_wrappers_tests.gyp
@@ -45,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',
],
@@ -60,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/test/Android.mk b/test/Android.mk
deleted file mode 100644
index 73dceea3..00000000
--- 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/buildbot_tests.py b/test/buildbot_tests.py
deleted file mode 100755
index da038d7f..00000000
--- 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
index e29b8de9..d49f6e3f 100644
--- a/test/call_test.cc
+++ b/test/call_test.cc
@@ -16,7 +16,6 @@ namespace test {
CallTest::CallTest()
: clock_(Clock::GetRealTimeClock()),
- encoder_settings_(NULL),
send_stream_(NULL),
fake_encoder_(clock_) {
}
@@ -40,8 +39,7 @@ void CallTest::RunBaseTest(BaseTest* test) {
if (test->ShouldCreateReceivers()) {
CreateMatchingReceiveConfigs();
}
- encoder_settings_ = test->GetEncoderSettings();
- test->ModifyConfigs(&send_config_, &receive_configs_, &video_streams_);
+ test->ModifyConfigs(&send_config_, &receive_configs_, &encoder_config_);
CreateStreams();
test->OnStreamsCreated(send_stream_, receive_streams_);
@@ -92,7 +90,7 @@ void CallTest::CreateSendConfig(size_t num_streams) {
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);
+ encoder_config_.streams = test::CreateVideoStreams(num_streams);
for (size_t i = 0; i < num_streams; ++i)
send_config_.rtp.ssrcs.push_back(kSendSsrcs[i]);
}
@@ -123,7 +121,7 @@ void CallTest::CreateMatchingReceiveConfigs() {
}
void CallTest::CreateFrameGeneratorCapturer() {
- VideoStream stream = video_streams_.back();
+ VideoStream stream = encoder_config_.streams.back();
frame_generator_capturer_.reset(
test::FrameGeneratorCapturer::Create(send_stream_->Input(),
stream.width,
@@ -135,8 +133,8 @@ void CallTest::CreateStreams() {
assert(send_stream_ == NULL);
assert(receive_streams_.empty());
- send_stream_ = sender_call_->CreateVideoSendStream(
- send_config_, video_streams_, encoder_settings_);
+ send_stream_ =
+ sender_call_->CreateVideoSendStream(send_config_, encoder_config_);
for (size_t i = 0; i < receive_configs_.size(); ++i) {
receive_streams_.push_back(
@@ -159,6 +157,8 @@ 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};
@@ -191,14 +191,10 @@ size_t BaseTest::GetNumStreams() const {
return 1;
}
-const void* BaseTest::GetEncoderSettings() {
- return NULL;
-}
-
void BaseTest::ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams) {
+ VideoEncoderConfig* encoder_config) {
}
void BaseTest::OnStreamsCreated(
diff --git a/test/call_test.h b/test/call_test.h
index b390329e..695fb2ac 100644
--- a/test/call_test.h
+++ b/test/call_test.h
@@ -36,6 +36,8 @@ class CallTest : public ::testing::Test {
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;
@@ -63,8 +65,7 @@ class CallTest : public ::testing::Test {
scoped_ptr<Call> sender_call_;
VideoSendStream::Config send_config_;
- std::vector<VideoStream> video_streams_;
- const void* encoder_settings_;
+ VideoEncoderConfig encoder_config_;
VideoSendStream* send_stream_;
scoped_ptr<Call> receiver_call_;
@@ -91,11 +92,10 @@ class BaseTest : public RtpRtcpObserver {
virtual Call::Config GetReceiverCallConfig();
virtual void OnCallsCreated(Call* sender_call, Call* receiver_call);
- virtual const void* GetEncoderSettings();
virtual void ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams);
+ VideoEncoderConfig* encoder_config);
virtual void OnStreamsCreated(
VideoSendStream* send_stream,
const std::vector<VideoReceiveStream*>& receive_streams);
diff --git a/test/channel_transport/OWNERS b/test/channel_transport/OWNERS
index 5fd9f4af..8117cdd0 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.h b/test/channel_transport/udp_socket2_win.h
index e4d6b8c2..629c9c36 100644
--- a/test/channel_transport/udp_socket2_win.h
+++ b/test/channel_transport/udp_socket2_win.h
@@ -42,36 +42,37 @@ public:
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;
+
+ SOCKET GetFd() { return _socket;}
- virtual 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 6fc9441d..355da536 100644
--- a/test/channel_transport/udp_socket_posix.cc
+++ b/test/channel_transport/udp_socket_posix.cc
@@ -33,7 +33,6 @@ UdpSocketPosix::UdpSocketPosix(const int32_t id, UdpSocketManager* mgr,
"UdpSocketPosix::UdpSocketPosix()");
_wantsIncoming = false;
- _error = 0;
_mgr = mgr;
_id = id;
@@ -129,9 +128,8 @@ bool UdpSocketPosix::SetSockopt(int32_t level, int32_t optname,
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 @@ bool UdpSocketPosix::Bind(const SocketAddress& name)
{
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 @@ int32_t UdpSocketPosix::SendTo(const int8_t* buf, int32_t len,
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 9b2c037a..8458ca0d 100644
--- a/test/channel_transport/udp_socket_posix.h
+++ b/test/channel_transport/udp_socket_posix.h
@@ -52,8 +52,7 @@ public:
// 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 @@ private:
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 8c74daf9..2b804c35 100644
--- a/test/channel_transport/udp_transport_impl.h
+++ b/test/channel_transport/udp_transport_impl.h
@@ -60,8 +60,8 @@ public:
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 b246da35..d3ed784c 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 f29038fa..4120bc6c 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 9842d1ed..0eeb0b9f 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 {
@@ -68,19 +69,9 @@ VideoCodec CreateDecoderVideoCodec(
}
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;
- }
-
- if (codec.codecType == kVideoCodecH264) {
- codec.codecSpecific.H264.profile = kProfileBase;
- codec.codecSpecific.H264.frameDroppingOn = true;
- codec.codecSpecific.H264.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_encoder.cc b/test/fake_encoder.cc
index ecd3dd87..9551c820 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 {
diff --git a/test/fake_encoder.h b/test/fake_encoder.h
index 3c6f7350..50b86520 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 {
diff --git a/test/test.gyp b/test/test.gyp
index 69776e7b..154ba2cd 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/audio_coding/main/test/ACMTest.cc b/test/testsupport/always_passing_unittest.cc
index dbbdade8..afb80e66 100644
--- a/modules/audio_coding/main/test/ACMTest.cc
+++ b/test/testsupport/always_passing_unittest.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 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,6 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "ACMTest.h"
+#include "testing/gtest/include/gtest/gtest.h"
-ACMTest::~ACMTest() {}
+namespace webrtc {
+
+// 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/webrtc_test_common.gyp b/test/webrtc_test_common.gyp
index be6b303f..d422a4b0 100644
--- a/test/webrtc_test_common.gyp
+++ b/test/webrtc_test_common.gyp
@@ -59,7 +59,8 @@
'<(DEPTH)/testing/gtest.gyp:gtest',
'<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
'<(webrtc_root)/modules/modules.gyp:media_file',
- '<(webrtc_root)/modules/modules.gyp:video_capture_module',
+ '<(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',
@@ -103,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',
@@ -138,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', {
diff --git a/test/win/d3d_renderer.h b/test/win/d3d_renderer.h
index e8b06926..7f375351 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 4d443773..39e9974a 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 00000000..efdce51c
--- /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 00000000..8b5bab10
--- /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 00000000..b51d49df
--- /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 00000000..88398021
--- /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 00000000..57bf5961
--- /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 00000000..cd88f19f
--- /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 00000000..36675ccb
--- /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 00000000..e519738b
--- /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 00000000..61eb0baf
--- /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 00000000..a9079763
--- /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 ee2a11d4..38a19fc8 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 d8977ff4..871f04ec 100644
--- a/typedefs.h
+++ b/typedefs.h
@@ -109,4 +109,24 @@ typedef unsigned __int64 uint64_t;
#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
index 18c43f91..f06d632f 100644
--- a/video/BUILD.gn
+++ b/video/BUILD.gn
@@ -9,6 +9,30 @@
import("../build/webrtc.gni")
source_set("video") {
- # TODO(pbos): Implement when video_engine_core is done.
+ 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/bitrate_estimator_tests.cc b/video/bitrate_estimator_tests.cc
index 40c1ed68..cb7c391e 100644
--- a/video/bitrate_estimator_tests.cc
+++ b/video/bitrate_estimator_tests.cc
@@ -13,11 +13,11 @@
#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"
@@ -148,7 +148,7 @@ class BitrateEstimatorTest : public test::CallTest {
send_config_.encoder_settings.encoder = NULL;
send_config_.encoder_settings.payload_name = "FAKE";
send_config_.encoder_settings.payload_type = kFakeSendPayloadType;
- video_streams_ = test::CreateVideoStreams(1);
+ encoder_config_.streams = test::CreateVideoStreams(1);
receive_config_ = VideoReceiveStream::Config();
assert(receive_config_.codecs.empty());
@@ -195,14 +195,14 @@ class BitrateEstimatorTest : public test::CallTest {
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();
diff --git a/video/call.cc b/video/call.cc
index cd29d627..25853f8b 100644
--- a/video/call.cc
+++ b/video/call.cc
@@ -14,20 +14,23 @@
#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";
@@ -39,6 +42,15 @@ bool RtpExtension::IsSupported(const std::string& name) {
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 {
@@ -75,8 +87,7 @@ class Call : public webrtc::Call, public PacketReceiver {
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;
@@ -93,18 +104,26 @@ class Call : public webrtc::Call, public PacketReceiver {
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 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<RWLockWrapper> send_crit_;
+ std::map<uint32_t, VideoSendStream*> send_ssrcs_ GUARDED_BY(send_crit_);
scoped_ptr<CpuOveruseObserverProxy> overuse_observer_proxy_;
@@ -135,8 +154,10 @@ const int kDefaultVideoStreamBitrateBps = 300000;
Call::Call(webrtc::VideoEngine* video_engine, const Call::Config& config)
: config_(config),
- receive_lock_(RWLockWrapper::CreateRWLock()),
- send_lock_(RWLockWrapper::CreateRWLock()),
+ 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);
@@ -174,8 +195,7 @@ PacketReceiver* Call::Receiver() { return this; }
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
@@ -185,18 +205,22 @@ VideoSendStream* Call::CreateVideoSendStream(
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;
}
@@ -207,7 +231,7 @@ void Call::DestroyVideoSendStream(webrtc::VideoSendStream* send_stream) {
VideoSendStream* send_stream_impl = NULL;
{
- WriteLockScoped write_lock(*send_lock_);
+ 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)) {
@@ -240,7 +264,10 @@ VideoReceiveStream* Call::CreateVideoReceiveStream(
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.
@@ -249,6 +276,8 @@ VideoReceiveStream* Call::CreateVideoReceiveStream(
if (it != config.rtp.rtx.end())
receive_ssrcs_[it->second.ssrc] = receive_stream;
+ if (!network_enabled_)
+ receive_stream->SignalNetworkState(kNetworkDown);
return receive_stream;
}
@@ -258,7 +287,7 @@ void Call::DestroyVideoReceiveStream(
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 =
@@ -289,6 +318,31 @@ uint32_t Call::ReceiveBitrateEstimate() {
return 0;
}
+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.
@@ -297,7 +351,7 @@ PacketReceiver::DeliveryStatus Call::DeliverRtcp(const uint8_t* packet,
// 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();
@@ -308,7 +362,7 @@ PacketReceiver::DeliveryStatus Call::DeliverRtcp(const uint8_t* packet,
}
{
- 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();
@@ -329,7 +383,7 @@ PacketReceiver::DeliveryStatus Call::DeliverRtp(const uint8_t* packet,
const uint8_t* ptr = &packet[8];
uint32_t ssrc = ptr[0] << 24 | ptr[1] << 16 | ptr[2] << 8 | ptr[3];
- ReadLockScoped read_lock(*receive_lock_);
+ ReadLockScoped read_lock(*receive_crit_);
std::map<uint32_t, VideoReceiveStream*>::iterator it =
receive_ssrcs_.find(ssrc);
diff --git a/video/call_perf_tests.cc b/video/call_perf_tests.cc
index 62d2adcb..cd83698f 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,6 @@
#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"
@@ -45,6 +45,8 @@ namespace webrtc {
class CallPerfTest : public test::CallTest {
protected:
+ void TestAudioVideoSync(bool fec);
+
void TestMinTransmitBitrate(bool pad_to_min_bitrate);
void TestCaptureNtpTime(const FakeNetworkPipe::Config& net_config,
@@ -185,7 +187,7 @@ class VideoRtcpAndSyncObserver : public SyncRtcpObserver, public VideoRenderer {
int64_t first_time_in_sync_;
};
-TEST_F(CallPerfTest, PlaysOutAudioAndVideoInSync) {
+void CallPerfTest::TestAudioVideoSync(bool fec) {
class AudioPacketReceiver : public PacketReceiver {
public:
AudioPacketReceiver(int channel, VoENetwork* voe_network)
@@ -226,6 +228,7 @@ TEST_F(CallPerfTest, PlaysOutAudioAndVideoInSync) {
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,
@@ -254,6 +257,14 @@ TEST_F(CallPerfTest, PlaysOutAudioAndVideoInSync) {
CreateSendConfig(1);
CreateMatchingReceiveConfigs();
+ 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;
@@ -291,6 +302,14 @@ TEST_F(CallPerfTest, PlaysOutAudioAndVideoInSync) {
VoiceEngine::Delete(voice_engine);
}
+TEST_F(CallPerfTest, PlaysOutAudioAndVideoInSync) {
+ TestAudioVideoSync(false);
+}
+
+TEST_F(CallPerfTest, PlaysOutAudioAndVideoInSyncWithFec) {
+ TestAudioVideoSync(true);
+}
+
void CallPerfTest::TestCaptureNtpTime(const FakeNetworkPipe::Config& net_config,
int threshold_ms,
int start_time_ms,
@@ -380,7 +399,7 @@ void CallPerfTest::TestCaptureNtpTime(const FakeNetworkPipe::Config& net_config,
virtual void ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams) OVERRIDE {
+ 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;
@@ -527,7 +546,7 @@ void CallPerfTest::TestMinTransmitBitrate(bool pad_to_min_bitrate) {
virtual void ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams) OVERRIDE {
+ VideoEncoderConfig* encoder_config) OVERRIDE {
if (pad_to_min_bitrate_) {
send_config->rtp.min_transmit_bitrate_bps = kMinTransmitBitrateBps;
} else {
diff --git a/video/end_to_end_tests.cc b/video/end_to_end_tests.cc
index 44c41b1d..0e87a033 100644
--- a/video/end_to_end_tests.cc
+++ b/video/end_to_end_tests.cc
@@ -19,7 +19,6 @@
#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"
@@ -35,13 +34,14 @@
#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 int kRedPayloadType = 118;
-static const int kUlpfecPayloadType = 119;
+static const unsigned long kSilenceTimeoutMs = 2000;
class EndToEndTest : public test::CallTest {
public:
@@ -53,6 +53,19 @@ class EndToEndTest : public test::CallTest {
}
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);
@@ -195,7 +208,7 @@ TEST_F(EndToEndTest, TransmitsFirstFrame) {
Start();
scoped_ptr<test::FrameGenerator> frame_generator(test::FrameGenerator::Create(
- video_streams_[0].width, video_streams_[0].height));
+ encoder_config_.streams[0].width, encoder_config_.streams[0].height));
send_stream_->Input()->SwapFrame(frame_generator->NextFrame());
EXPECT_EQ(kEventSignaled, renderer.Wait())
@@ -225,13 +238,13 @@ TEST_F(EndToEndTest, SendsAndReceivesH264) {
virtual void ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams) {
+ 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;
- (*video_streams)[0].min_bitrate_bps = 50000;
- (*video_streams)[0].target_bitrate_bps =
- (*video_streams)[0].max_bitrate_bps = 2000000;
+ 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 =
@@ -356,7 +369,7 @@ TEST_F(EndToEndTest, ReceivesAndRetransmitsNack) {
virtual void ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams) OVERRIDE {
+ VideoEncoderConfig* encoder_config) OVERRIDE {
send_config->rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
(*receive_configs)[0].rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
}
@@ -450,7 +463,7 @@ TEST_F(EndToEndTest, DISABLED_CanReceiveFec) {
virtual void ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams) OVERRIDE {
+ 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;
@@ -528,7 +541,7 @@ void EndToEndTest::DecodesRetransmittedFrame(bool retransmit_over_rtx) {
virtual void ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams) OVERRIDE {
+ 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;
@@ -630,12 +643,13 @@ TEST_F(EndToEndTest, UsesFrameCallbacks) {
receiver_transport.SetReceiver(sender_call_->Receiver());
CreateSendConfig(1);
- scoped_ptr<VP8Encoder> encoder(VP8Encoder::Create());
+ 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, video_streams_.size()) << "Test setup error.";
- video_streams_[0].width = kWidth;
- video_streams_[0].height = kHeight;
+ 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();
@@ -730,7 +744,7 @@ void EndToEndTest::ReceivesPliAndRecovers(int rtp_history_ms) {
virtual void ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams) OVERRIDE {
+ 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;
@@ -877,7 +891,7 @@ void EndToEndTest::RespectsRtcpMode(newapi::RtcpMode rtcp_mode) {
virtual void ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams) OVERRIDE {
+ 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_;
@@ -959,9 +973,9 @@ TEST_F(EndToEndTest, SendsAndReceivesMultipleStreams) {
VideoOutputObserver* observers[kNumStreams];
test::FrameGeneratorCapturer* frame_generators[kNumStreams];
- scoped_ptr<VP8Encoder> encoders[kNumStreams];
+ scoped_ptr<VideoEncoder> encoders[kNumStreams];
for (size_t i = 0; i < kNumStreams; ++i)
- encoders[i].reset(VP8Encoder::Create());
+ encoders[i].reset(VideoEncoder::Create(VideoEncoder::kVp8));
for (size_t i = 0; i < kNumStreams; ++i) {
uint32_t ssrc = codec_settings[i].ssrc;
@@ -974,15 +988,16 @@ TEST_F(EndToEndTest, SendsAndReceivesMultipleStreams) {
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];
+ 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, video_streams, NULL);
+ sender_call->CreateVideoSendStream(send_config, encoder_config);
send_streams[i]->Start();
VideoReceiveStream::Config receive_config;
@@ -1073,7 +1088,7 @@ TEST_F(EndToEndTest, ObserversEncodedFrames) {
Start();
scoped_ptr<test::FrameGenerator> frame_generator(test::FrameGenerator::Create(
- video_streams_[0].width, video_streams_[0].height));
+ encoder_config_.streams[0].width, encoder_config_.streams[0].height));
send_stream_->Input()->SwapFrame(frame_generator->NextFrame());
EXPECT_EQ(kEventSignaled, post_encode_observer.Wait())
@@ -1198,7 +1213,7 @@ void EndToEndTest::TestXrReceiverReferenceTimeReport(bool enable_rrtr) {
virtual void ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams) OVERRIDE {
+ VideoEncoderConfig* encoder_config) OVERRIDE {
(*receive_configs)[0].rtp.rtcp_mode = newapi::kRtcpReducedSize;
(*receive_configs)[0].rtp.rtcp_xr.receiver_reference_time_report =
enable_rrtr_;
@@ -1266,19 +1281,19 @@ void EndToEndTest::TestSendsSetSsrcs(size_t num_ssrcs,
virtual void ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams) OVERRIDE {
+ 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 < video_streams->size(); ++i) {
- (*video_streams)[i].min_bitrate_bps = 10000;
- (*video_streams)[i].target_bitrate_bps = 15000;
- (*video_streams)[i].max_bitrate_bps = 20000;
+ 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;
}
}
- all_streams_ = *video_streams;
+ encoder_config_all_streams_ = *encoder_config;
if (send_single_ssrc_first_)
- video_streams->resize(1);
+ encoder_config->streams.resize(1);
}
virtual void OnStreamsCreated(
@@ -1294,7 +1309,7 @@ void EndToEndTest::TestSendsSetSsrcs(size_t num_ssrcs,
if (send_single_ssrc_first_) {
// Set full simulcast and continue with the rest of the SSRCs.
- send_stream_->ReconfigureVideoEncoder(all_streams_, NULL);
+ send_stream_->ReconfigureVideoEncoder(encoder_config_all_streams_);
EXPECT_EQ(kEventSignaled, Wait())
<< "Timed out while waiting on additional SSRCs.";
}
@@ -1311,7 +1326,7 @@ void EndToEndTest::TestSendsSetSsrcs(size_t num_ssrcs,
bool expect_single_ssrc_;
VideoSendStream* send_stream_;
- std::vector<VideoStream> all_streams_;
+ VideoEncoderConfig encoder_config_all_streams_;
} test(kSendSsrcs, num_ssrcs, send_single_ssrc_first);
RunBaseTest(&test);
@@ -1455,7 +1470,7 @@ TEST_F(EndToEndTest, GetStats) {
virtual void ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams) OVERRIDE {
+ VideoEncoderConfig* encoder_config) OVERRIDE {
send_config->pre_encode_callback = this; // Used to inject delay.
send_config->rtp.c_name = "SomeCName";
@@ -1631,12 +1646,12 @@ TEST_F(EndToEndTest, DISABLED_RedundantPayloadsTransmittedOnAllSsrcs) {
virtual void ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams) OVERRIDE {
+ VideoEncoderConfig* encoder_config) OVERRIDE {
// 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 = 15000;
- (*video_streams)[i].max_bitrate_bps = 20000;
+ 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.
@@ -1770,10 +1785,10 @@ void EndToEndTest::TestRtpStatePreservation(bool use_rtx) {
}
// Lower bitrates so that all streams send initially.
- for (size_t i = 0; i < video_streams_.size(); ++i) {
- video_streams_[i].min_bitrate_bps = 10000;
- video_streams_[i].target_bitrate_bps = 15000;
- video_streams_[i].max_bitrate_bps = 20000;
+ 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();
@@ -1792,10 +1807,10 @@ void EndToEndTest::TestRtpStatePreservation(bool use_rtx) {
sender_call_->DestroyVideoSendStream(send_stream_);
// Re-create VideoSendStream with only one stream.
- std::vector<VideoStream> one_stream = video_streams_;
- one_stream.resize(1);
+ VideoEncoderConfig one_stream = encoder_config_;
+ one_stream.streams.resize(1);
send_stream_ =
- sender_call_->CreateVideoSendStream(send_config_, one_stream, NULL);
+ sender_call_->CreateVideoSendStream(send_config_, one_stream);
send_stream_->Start();
CreateFrameGeneratorCapturer();
frame_generator_capturer_->Start();
@@ -1805,19 +1820,19 @@ void EndToEndTest::TestRtpStatePreservation(bool use_rtx) {
<< "Timed out waiting for single RTP packet.";
// Reconfigure back to use all streams.
- send_stream_->ReconfigureVideoEncoder(video_streams_, NULL);
+ 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, NULL);
+ 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(video_streams_, NULL);
+ send_stream_->ReconfigureVideoEncoder(encoder_config_);
observer.ResetExpectedSsrcs(kNumSsrcs);
EXPECT_EQ(kEventSignaled, observer.Wait())
<< "Timed out waiting for all SSRCs to send packets.";
@@ -1829,7 +1844,7 @@ void EndToEndTest::TestRtpStatePreservation(bool use_rtx) {
DestroyStreams();
}
-TEST_F(EndToEndTest, RestartingSendStreamPreservesRtpState) {
+TEST_F(EndToEndTest, DISABLED_RestartingSendStreamPreservesRtpState) {
TestRtpStatePreservation(false);
}
@@ -1837,4 +1852,226 @@ 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 a9ddd2c9..f2d71a97 100644
--- a/video/full_stack.cc
+++ b/video/full_stack.cc
@@ -14,16 +14,15 @@
#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"
@@ -388,12 +387,13 @@ void FullStackTest::RunTest(const FullStackTestParams& params) {
CreateSendConfig(1);
- scoped_ptr<VP8Encoder> encoder(VP8Encoder::Create());
+ 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 = &video_streams_[0];
+ VideoStream* stream = &encoder_config_.streams[0];
stream->width = params.clip.width;
stream->height = params.clip.height;
stream->min_bitrate_bps = params.min_bitrate_bps;
diff --git a/video/loopback.cc b/video/loopback.cc
index 4ec73882..488adf41 100644
--- a/video/loopback.cc
+++ b/video/loopback.cc
@@ -120,7 +120,7 @@ void Loopback() {
send_config.local_renderer = local_preview.get();
scoped_ptr<VideoEncoder> encoder;
if (flags::Codec() == "VP8") {
- encoder.reset(VP8Encoder::Create());
+ encoder.reset(VideoEncoder::Create(VideoEncoder::kVp8));
} else {
// Codec not supported.
assert(false && "Codec not supported!");
@@ -129,8 +129,9 @@ void Loopback() {
send_config.encoder_settings.encoder = encoder.get();
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;
@@ -140,7 +141,7 @@ void Loopback() {
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();
diff --git a/video/rampup_tests.cc b/video/rampup_tests.cc
index e1dd95a6..10bcb7f1 100644
--- a/video/rampup_tests.cc
+++ b/video/rampup_tests.cc
@@ -411,8 +411,8 @@ void RampUpTest::RunRampUpTest(bool rtx,
receiver_transport.SetReceiver(sender_call_->Receiver());
if (num_streams == 1) {
- video_streams_[0].target_bitrate_bps = 2000000;
- video_streams_[0].max_bitrate_bps = 2000000;
+ encoder_config_.streams[0].target_bitrate_bps = 2000000;
+ encoder_config_.streams[0].max_bitrate_bps = 2000000;
}
send_config_.rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
@@ -430,9 +430,9 @@ void RampUpTest::RunRampUpTest(bool rtx,
// 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;
+ 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);
}
diff --git a/video/receive_statistics_proxy.cc b/video/receive_statistics_proxy.cc
index 60042818..38262834 100644
--- a/video/receive_statistics_proxy.cc
+++ b/video/receive_statistics_proxy.cc
@@ -42,7 +42,7 @@ VideoReceiveStream::Stats ReceiveStatisticsProxy::GetStats() const {
}
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 35e5cc3e..b5fbf860 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/send_statistics_proxy.h b/video/send_statistics_proxy.h
index 1b888b03..ef459dab 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 {
diff --git a/video/video_receive_stream.cc b/video/video_receive_stream.cc
index 9c3298c5..41a800fa 100644
--- a/video/video_receive_stream.cc
+++ b/video/video_receive_stream.cc
@@ -52,14 +52,7 @@ VideoReceiveStream::VideoReceiveStream(webrtc::VideoEngine* video_engine,
// 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 @@ int32_t VideoReceiveStream::RenderFrame(const uint32_t stream_id,
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 c45ebac8..68948287 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"
@@ -61,11 +62,14 @@ class VideoReceiveStream : public webrtc::VideoReceiveStream,
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 6597029a..6e8f2381 100644
--- a/video/video_send_stream.cc
+++ b/video/video_send_stream.cc
@@ -114,8 +114,7 @@ VideoSendStream::VideoSendStream(
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_bps)
@@ -211,7 +210,7 @@ VideoSendStream::VideoSendStream(
}
codec_ = ViECodec::GetInterface(video_engine);
- if (!ReconfigureVideoEncoder(video_streams, encoder_settings))
+ if (!ReconfigureVideoEncoder(encoder_config))
abort();
if (overuse_observer)
@@ -297,8 +296,8 @@ void VideoSendStream::Stop() {
}
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());
@@ -311,29 +310,31 @@ bool VideoSendStream::ReconfigureVideoEncoder(
} 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.profile = kProfileBase;
- video_codec.codecSpecific.H264.frameDroppingOn = true;
- video_codec.codecSpecific.H264.keyFrameInterval = 3000;
+ video_codec.codecSpecific.H264 = VideoEncoder::GetDefaultH264Settings();
}
if (video_codec.codecType == kVideoCodecVP8) {
- if (encoder_settings != NULL) {
- video_codec.codecSpecific.VP8 =
- *reinterpret_cast<const VideoCodecVP8*>(encoder_settings);
+ 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(encoder_settings == NULL);
+ assert(config.encoder_specific_settings == NULL);
}
strncpy(video_codec.plName,
@@ -363,8 +364,8 @@ bool VideoSendStream::ReconfigureVideoEncoder(
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));
@@ -460,5 +461,16 @@ std::map<uint32_t, RtpState> VideoSendStream::GetRtpStates() const {
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
} // namespace webrtc
diff --git a/video/video_send_stream.h b/video/video_send_stream.h
index f1f8f7d1..8a77852e 100644
--- a/video/video_send_stream.h
+++ b/video/video_send_stream.h
@@ -14,6 +14,7 @@
#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"
@@ -45,8 +46,7 @@ class VideoSendStream : public webrtc::VideoSendStream,
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);
@@ -56,8 +56,8 @@ class VideoSendStream : public webrtc::VideoSendStream,
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;
@@ -72,6 +72,8 @@ class VideoSendStream : public webrtc::VideoSendStream,
typedef std::map<uint32_t, RtpState> RtpStateMap;
RtpStateMap GetRtpStates() const;
+ void SignalNetworkState(Call::NetworkState state);
+
private:
void ConfigureSsrcs();
TransportAdapter transport_adapter_;
diff --git a/video/video_send_stream_tests.cc b/video/video_send_stream_tests.cc
index b08c4058..6c2fa39f 100644
--- a/video/video_send_stream_tests.cc
+++ b/video/video_send_stream_tests.cc
@@ -114,7 +114,7 @@ TEST_F(VideoSendStreamTest, SupportsCName) {
virtual void ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams) OVERRIDE {
+ VideoEncoderConfig* encoder_config) OVERRIDE {
send_config->rtp.c_name = kCName;
}
@@ -152,7 +152,7 @@ TEST_F(VideoSendStreamTest, SupportsAbsoluteSendTime) {
virtual void ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams) OVERRIDE {
+ VideoEncoderConfig* encoder_config) OVERRIDE {
send_config->rtp.extensions.push_back(
RtpExtension(RtpExtension::kAbsSendTime, kAbsSendTimeExtensionId));
}
@@ -193,7 +193,7 @@ TEST_F(VideoSendStreamTest, SupportsTransmissionTimeOffset) {
virtual void ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams) OVERRIDE {
+ VideoEncoderConfig* encoder_config) OVERRIDE {
send_config->encoder_settings.encoder = &encoder_;
send_config->rtp.extensions.push_back(
RtpExtension(RtpExtension::kTOffset, kTOffsetExtensionId));
@@ -308,8 +308,6 @@ TEST_F(VideoSendStreamTest, SwapsI420VideoFrames) {
}
TEST_F(VideoSendStreamTest, SupportsFec) {
- static const int kRedPayloadType = 118;
- static const int kUlpfecPayloadType = 119;
class FecObserver : public test::SendTest {
public:
FecObserver()
@@ -362,7 +360,7 @@ TEST_F(VideoSendStreamTest, SupportsFec) {
virtual void ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams) OVERRIDE {
+ VideoEncoderConfig* encoder_config) OVERRIDE {
send_config->rtp.fec.red_payload_type = kRedPayloadType;
send_config->rtp.fec.ulpfec_payload_type = kUlpfecPayloadType;
}
@@ -442,7 +440,7 @@ void VideoSendStreamTest::TestNackRetransmission(
virtual void ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams) OVERRIDE {
+ 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])
@@ -483,8 +481,6 @@ void VideoSendStreamTest::TestPacketFragmentationSize(VideoFormat format,
static const uint32_t start = 90;
static const uint32_t stop = 290;
- static const int kRedPayloadType = 118;
- static const int kUlpfecPayloadType = 119;
// Observer that verifies that the expected number of packets and bytes
// arrive for each frame size, from start_size to stop_size.
class FrameFragmentationTest : public test::SendTest,
@@ -617,7 +613,7 @@ void VideoSendStreamTest::TestPacketFragmentationSize(VideoFormat format,
virtual void ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams) OVERRIDE {
+ VideoEncoderConfig* encoder_config) OVERRIDE {
if (use_fec_) {
send_config->rtp.fec.red_payload_type = kRedPayloadType;
send_config->rtp.fec.ulpfec_payload_type = kUlpfecPayloadType;
@@ -792,14 +788,14 @@ TEST_F(VideoSendStreamTest, SuspendBelowMinBitrate) {
virtual void ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams) OVERRIDE {
+ 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 = (*video_streams)[0].min_bitrate_bps;
+ 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((*video_streams)[0].max_bitrate_bps,
+ 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);
}
@@ -981,7 +977,7 @@ TEST_F(VideoSendStreamTest, ProducesStats) {
virtual void ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams) OVERRIDE {
+ VideoEncoderConfig* encoder_config) OVERRIDE {
SetConfig(*send_config);
}
@@ -1078,7 +1074,7 @@ TEST_F(VideoSendStreamTest, MinTransmitBitrateRespectsRemb) {
virtual void ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams) OVERRIDE {
+ VideoEncoderConfig* encoder_config) OVERRIDE {
send_config->rtp.min_transmit_bitrate_bps = kMinTransmitBitrateBps;
}
@@ -1137,8 +1133,8 @@ TEST_F(VideoSendStreamTest, CapturesTextureAndI420VideoFrames) {
// Prepare five input frames. Send I420VideoFrame and TextureVideoFrame
// alternatively.
ScopedVector<I420VideoFrame> input_frames;
- int width = static_cast<int>(video_streams_[0].width);
- int height = static_cast<int>(video_streams_[0].height);
+ 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 =
@@ -1158,7 +1154,7 @@ TEST_F(VideoSendStreamTest, CapturesTextureAndI420VideoFrames) {
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 / video_streams_[0].max_framerate);
+ 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();
@@ -1331,16 +1327,16 @@ TEST_F(VideoSendStreamTest, EncoderIsProperlyInitializedAndDestroyed) {
virtual void ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams) OVERRIDE {
+ VideoEncoderConfig* encoder_config) OVERRIDE {
send_config->encoder_settings.encoder = this;
- video_streams_ = *video_streams;
+ 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(video_streams_, NULL);
+ stream_->ReconfigureVideoEncoder(encoder_config_);
EXPECT_EQ(0u, num_releases());
stream_->Stop();
// Encoder should not be released before destroying the VideoSendStream.
@@ -1358,7 +1354,7 @@ TEST_F(VideoSendStreamTest, EncoderIsProperlyInitializedAndDestroyed) {
bool callback_registered_ GUARDED_BY(crit_);
size_t num_releases_ GUARDED_BY(crit_);
bool released_ GUARDED_BY(crit_);
- std::vector<VideoStream> video_streams_;
+ VideoEncoderConfig encoder_config_;
} test_encoder;
RunBaseTest(&test_encoder);
@@ -1367,7 +1363,64 @@ TEST_F(VideoSendStreamTest, EncoderIsProperlyInitializedAndDestroyed) {
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:
@@ -1382,11 +1435,17 @@ TEST_F(VideoSendStreamTest, EncoderSetupPropagatesVp8Config) {
virtual void ModifyConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
- std::vector<VideoStream>* video_streams) OVERRIDE {
+ VideoEncoderConfig* encoder_config) OVERRIDE {
send_config->encoder_settings.encoder = this;
send_config->encoder_settings.payload_name = "VP8";
- video_streams_ = *video_streams;
+ 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(
@@ -1399,6 +1458,20 @@ TEST_F(VideoSendStreamTest, EncoderSetupPropagatesVp8Config) {
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_,
@@ -1411,26 +1484,23 @@ TEST_F(VideoSendStreamTest, EncoderSetupPropagatesVp8Config) {
EXPECT_EQ(1u, num_initializations_) << "VideoEncoder not initialized.";
vp8_settings_.denoisingOn = true;
- stream_->ReconfigureVideoEncoder(video_streams_, &vp8_settings_);
+ 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) {
+ 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;
}
- virtual const void* GetEncoderSettings() OVERRIDE { return &vp8_settings_; }
-
VideoCodecVP8 vp8_settings_;
size_t num_initializations_;
VideoSendStream* stream_;
- std::vector<VideoStream> video_streams_;
+ VideoEncoderConfig encoder_config_;
} test;
RunBaseTest(&test);
diff --git a/video_encoder.h b/video_encoder.h
new file mode 100644
index 00000000..cbdf1ef0
--- /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 74866cc2..00000000
--- 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
index c93833aa..1b767769 100644
--- a/video_engine/BUILD.gn
+++ b/video_engine/BUILD.gn
@@ -13,5 +13,102 @@ source_set("video_engine") {
}
source_set("video_engine_core") {
- # TODO(pbos): Implement.
+ 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 5fabf118..7c5d371a 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
diff --git a/video_engine/call_stats.h b/video_engine/call_stats.h
index 5eb33358..95f4fee7 100644
--- a/video_engine/call_stats.h
+++ b/video_engine/call_stats.h
@@ -32,8 +32,8 @@ class CallStats : public Module {
~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 23625706..4e619e58 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;
@@ -142,11 +138,6 @@ class WEBRTC_DLLEXPORT VideoEngine {
// 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() {}
diff --git a/video_engine/include/vie_codec.h b/video_engine/include/vie_codec.h
index f658aaa2..c6354d33 100644
--- a/video_engine/include/vie_codec.h
+++ b/video_engine/include/vie_codec.h
@@ -150,7 +150,13 @@ class WEBRTC_DLLEXPORT ViECodec {
// 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/test/auto_test/android/Android.mk b/video_engine/test/auto_test/android/Android.mk
deleted file mode 100644
index 5f8d5482..00000000
--- 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 284ecabb..00000000
--- 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/source/Android.mk b/video_engine/test/auto_test/source/Android.mk
deleted file mode 100644
index ffe113b9..00000000
--- 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_android.cc b/video_engine/test/auto_test/source/vie_autotest_android.cc
index ac0dd17e..ced235f6 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 f9a5c220..b22e3673 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 PrintCodecStatistics(webrtc::ViECodec* vie_codec,
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/vie_auto_test.gypi b/video_engine/test/auto_test/vie_auto_test.gypi
index 96291660..a415b3b3 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 50559b24..2037ba91 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 @@ public:
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);
-
- virtual int32_t Release();
+ webrtc::EncodedImageCallback* callback) OVERRIDE;
- virtual int32_t Reset();
+ virtual int32_t Release() OVERRIDE;
- virtual int32_t SetChannelParameters(uint32_t packetLoss, int rtt);
+ virtual int32_t SetChannelParameters(uint32_t packetLoss, int rtt) OVERRIDE;
- virtual int32_t SetRates(uint32_t newBitRate, uint32_t frameRate);
+ virtual int32_t SetRates(uint32_t newBitRate, uint32_t frameRate) OVERRIDE;
- 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 @@ public:
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 5ed5e46c..f807fd58 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 @@ TbI420Encoder::~TbI420Encoder()
}
}
-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 @@ int32_t TbI420Encoder::Release()
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 ce9d5365..fd61043e 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 898175c8..19e9654d 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -75,13 +73,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -119,12 +118,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -165,6 +167,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -182,7 +185,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -196,13 +198,13 @@ MY_CFLAGS_Release := \
-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,12 +242,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +292,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -305,50 +311,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 ebb92297..4ab9a5dc 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -86,6 +84,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -108,12 +107,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -151,6 +153,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -166,7 +169,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -214,12 +216,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +263,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -275,42 +281,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 4ba26def..cfb9b431 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -75,8 +73,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -91,6 +87,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -114,12 +111,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +159,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -176,7 +177,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -190,8 +190,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -229,12 +227,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +276,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -293,46 +295,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/video_engine/video_engine_core.target.darwin-x86.mk
index 0d15cbf6..b362bbfa 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -91,6 +89,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -114,12 +113,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +159,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -172,7 +175,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -226,12 +228,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +275,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -287,46 +293,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 ecf66ba8..c43757c0 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -90,6 +88,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -113,12 +112,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -156,6 +158,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -172,7 +175,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -224,12 +226,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +273,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -285,46 +291,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 898175c8..19e9654d 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -75,13 +73,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -119,12 +118,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -165,6 +167,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -182,7 +185,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -196,13 +198,13 @@ MY_CFLAGS_Release := \
-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,12 +242,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +292,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -305,50 +311,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 ebb92297..4ab9a5dc 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -86,6 +84,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -108,12 +107,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -151,6 +153,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -166,7 +169,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -214,12 +216,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +263,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -275,42 +281,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 4ba26def..cfb9b431 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -75,8 +73,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -91,6 +87,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -114,12 +111,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +159,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -176,7 +177,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -190,8 +190,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -229,12 +227,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +276,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -293,46 +295,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/video_engine/video_engine_core.target.linux-x86.mk
index 0d15cbf6..b362bbfa 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -91,6 +89,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -114,12 +113,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +159,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -172,7 +175,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -226,12 +228,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +275,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -287,46 +293,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 ecf66ba8..c43757c0 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 @@ 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_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -90,6 +88,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -113,12 +112,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -156,6 +158,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -172,7 +175,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -224,12 +226,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +273,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -285,46 +291,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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_capturer.h b/video_engine/vie_capturer.h
index 2464ca04..fdee5d88 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"
diff --git a/video_engine/vie_channel.cc b/video_engine/vie_channel.cc
index b8f90027..bbcb602c 100644
--- a/video_engine/vie_channel.cc
+++ b/video_engine/vie_channel.cc
@@ -1012,15 +1012,33 @@ int32_t ViEChannel::GetSendRtcpStatistics(uint16_t* fraction_lost,
// Aggregate the report blocks associated with streams sent on this channel.
std::vector<RTCPReportBlock> report_blocks;
rtp_rtcp_->RemoteRTCPStat(&report_blocks);
- for (std::list<RtpRtcp*>::iterator it = simulcast_rtp_rtcp_.begin();
- it != simulcast_rtp_rtcp_.end();
- ++it) {
- (*it)->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);
+ }
}
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 (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;
+ }
+
RTCPReportBlock report;
if (report_blocks.size() > 1)
report = AggregateReportBlocks(report_blocks, &prev_report_blocks_);
@@ -1034,8 +1052,7 @@ int32_t ViEChannel::GetSendRtcpStatistics(uint16_t* fraction_lost,
uint16_t dummy;
uint16_t rtt = 0;
- if (rtp_rtcp_->RTT(
- vie_receiver_.GetRemoteSsrc(), &rtt, &dummy, &dummy, &dummy) != 0) {
+ if (rtp_rtcp_->RTT(remote_ssrc, &rtt, &dummy, &dummy, &dummy) != 0) {
return -1;
}
*rtt_ms = rtt;
diff --git a/video_engine/vie_channel_group.cc b/video_engine/vie_channel_group.cc
index 516833bd..c6b3f741 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"
@@ -54,39 +54,39 @@ class WrappingBitrateEstimator : public RemoteBitrateEstimator {
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() {
+ virtual int32_t Process() OVERRIDE {
CriticalSectionScoped cs(crit_sect_.get());
return rbe_->Process();
}
- virtual int32_t TimeUntilNextProcess() {
+ 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);
}
diff --git a/video_engine/vie_codec_impl.cc b/video_engine/vie_codec_impl.cc
index 81736d64..f939a667 100644
--- a/video_engine/vie_codec_impl.cc
+++ b/video_engine/vie_codec_impl.cc
@@ -416,20 +416,20 @@ int ViECodecImpl::GetCodecTargetBitrate(const int video_channel,
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 static_cast<unsigned int>(-1);
+ 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);
diff --git a/video_engine/vie_codec_impl.h b/video_engine/vie_codec_impl.h
index cee3ed2b..ed8bf8a7 100644
--- a/video_engine/vie_codec_impl.h
+++ b/video_engine/vie_codec_impl.h
@@ -53,7 +53,7 @@ class ViECodecImpl
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_encoder.h b/video_engine/vie_encoder.h
index 781e2702..51c1d016 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 @@ class ViEEncoder
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 @@ class ViEEncoder
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 @@ class ViEEncoder
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 @@ class ViEEncoder
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);
diff --git a/video_engine/vie_impl.cc b/video_engine/vie_impl.cc
index 3cdf5da2..79f033b4 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 @@ int VideoEngine::SetTraceCallback(TraceCallback* callback) {
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 f9f008f3..c5e92106 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 5d90ac67..a19c4b05 100644
--- a/video_engine/vie_receiver.cc
+++ b/video_engine/vie_receiver.cc
@@ -193,7 +193,8 @@ bool ViEReceiver::OnRecoveredPacket(const uint8_t* rtp_packet,
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 817caddb..3451d524 100644
--- a/video_engine/vie_receiver.h
+++ b/video_engine/vie_receiver.h
@@ -72,14 +72,14 @@ class ViEReceiver : public RtpData {
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_sync_module.h b/video_engine/vie_sync_module.h
index cc0d92bd..e6ca5fd2 100644
--- a/video_engine/vie_sync_module.h
+++ b/video_engine/vie_sync_module.h
@@ -45,8 +45,8 @@ class ViESyncModule : public Module {
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 00000000..f76b9af3
--- /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 b1633f93..4eb5532b 100644
--- a/video_receive_stream.h
+++ b/video_receive_stream.h
@@ -68,7 +68,7 @@ class VideoReceiveStream {
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;
};
diff --git a/video_send_stream.h b/video_send_stream.h
index 8c9d5b7f..dd2bec12 100644
--- a/video_send_stream.h
+++ b/video_send_stream.h
@@ -153,8 +153,7 @@ class VideoSendStream {
// 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 3dc3c36b..00000000
--- 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
index 7c1a1b19..f9c5f913 100644
--- a/voice_engine/BUILD.gn
+++ b/voice_engine/BUILD.gn
@@ -9,5 +9,97 @@
import("../build/webrtc.gni")
source_set("voice_engine") {
- # TODO(henrika): Implement.
+
+ 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/channel.cc b/voice_engine/channel.cc
index 3f13ba27..93a241be 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 @@ int32_t Channel::GetAudioFrame(int32_t id, AudioFrame& audioFrame)
(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 @@ Channel::Channel(int32_t channelId,
_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),
@@ -1390,61 +1392,6 @@ Channel::StopReceiving()
}
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),
@@ -1749,14 +1696,14 @@ Channel::SetSendCNPayloadType(int type, PayloadFrequencies frequency)
return 0;
}
-int Channel::SetOpusMaxBandwidth(int bandwidth_hz) {
+int Channel::SetOpusMaxPlaybackRate(int frequency_hz) {
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId),
- "Channel::SetOpusMaxBandwidth()");
+ "Channel::SetOpusMaxPlaybackRate()");
- if (audio_coding_->SetOpusMaxBandwidth(bandwidth_hz) != 0) {
+ if (audio_coding_->SetOpusMaxPlaybackRate(frequency_hz) != 0) {
_engineStatisticsPtr->SetLastError(
VE_AUDIO_CODING_MODULE_ERROR, kTraceError,
- "SetOpusMaxBandwidth() failed to set maximum encoding bandwidth");
+ "SetOpusMaxPlaybackRate() failed to set maximum playback rate");
return -1;
}
return 0;
@@ -1949,8 +1896,11 @@ int32_t Channel::ReceivedRTCPPacket(const int8_t* data, int32_t length) {
"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;
}
@@ -3476,43 +3426,7 @@ Channel::GetRTPStatistics(CallStatistics& stats)
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),
@@ -4561,5 +4475,52 @@ int32_t Channel::GetPlayoutFrequency() {
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 a4f7ecd4..535922fa 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"
@@ -193,8 +194,6 @@ public:
int32_t StartReceiving();
int32_t StopReceiving();
- int32_t SetNetEQPlayoutMode(NetEqModes mode);
- int32_t GetNetEQPlayoutMode(NetEqModes& mode);
int32_t RegisterVoiceEngineObserver(VoiceEngineObserver& observer);
int32_t DeRegisterVoiceEngineObserver();
@@ -207,7 +206,7 @@ public:
int32_t SetRecPayloadType(const CodecInst& codec);
int32_t GetRecPayloadType(CodecInst& codec);
int32_t SetSendCNPayloadType(int type, PayloadFrequencies frequency);
- int SetOpusMaxBandwidth(int bandwidth_hz);
+ int SetOpusMaxPlaybackRate(int frequency_hz);
// VoE dual-streaming.
int SetSecondarySendCodec(const CodecInst& codec, int red_payload_type);
@@ -507,6 +506,7 @@ private:
unsigned char id);
int32_t GetPlayoutFrequency();
+ int GetRTT() const;
CriticalSectionWrapper& _fileCritSect;
CriticalSectionWrapper& _callbackCritSect;
@@ -548,7 +548,7 @@ private:
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_;
@@ -566,7 +566,7 @@ private:
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;
diff --git a/voice_engine/include/voe_base.h b/voice_engine/include/voe_base.h
index 3a78f7b6..65a71758 100644
--- a/voice_engine/include/voe_base.h
+++ b/voice_engine/include/voe_base.h
@@ -181,9 +181,6 @@ public:
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 56835f70..234596a2 100644
--- a/voice_engine/include/voe_codec.h
+++ b/voice_engine/include/voe_codec.h
@@ -126,11 +126,11 @@ public:
virtual int GetVADStatus(int channel, bool& enabled, VadModes& mode,
bool& disabledDTX) = 0;
- // Sets the maximum audio bandwidth needs to be encoded in Hz,
- // |bandwidth_hz|, for the Opus encoder on a specific |channel|.
- // TODO(minyue): Make SetOpusMaxBandwidth() pure virtual when
+ // 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 SetOpusMaxBandwidth(int channel, int bandwidth_hz) {
+ virtual int SetOpusMaxPlaybackRate(int channel, int frequency_hz) {
return -1;
}
diff --git a/voice_engine/monitor_module.cc b/voice_engine/monitor_module.cc
index 2389a51c..88de5c88 100644
--- a/voice_engine/monitor_module.cc
+++ b/voice_engine/monitor_module.cc
@@ -53,14 +53,6 @@ MonitorModule::DeRegisterObserver()
}
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 ebe4acaa..693b2e00 100644
--- a/voice_engine/monitor_module.h
+++ b/voice_engine/monitor_module.h
@@ -40,15 +40,11 @@ public:
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/test/android/OWNERS b/voice_engine/test/android/OWNERS
deleted file mode 100644
index 6ba5af0b..00000000
--- 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 a3f5ce60..00000000
--- 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 d7e04b56..00000000
--- 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 cfb9d670..00000000
--- 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 8ca43283..3b56bae5 100644
--- a/voice_engine/test/auto_test/standard/codec_test.cc
+++ b/voice_engine/test/auto_test/standard/codec_test.cc
@@ -130,30 +130,30 @@ TEST_F(CodecTest, VoiceActivityDetectionCanBeTurnedOff) {
EXPECT_EQ(webrtc::kVadConventional, vad_mode);
}
-TEST_F(CodecTest, OpusMaxBandwidthCanBeSet) {
+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_);
- // SetOpusMaxBandwidth can handle any integer as the bandwidth. Following
+ // SetOpusMaxPlaybackRate can handle any integer as the bandwidth. Following
// tests some most commonly used numbers.
- EXPECT_EQ(0, voe_codec_->SetOpusMaxBandwidth(channel_, 24000));
- EXPECT_EQ(0, voe_codec_->SetOpusMaxBandwidth(channel_, 16000));
- EXPECT_EQ(0, voe_codec_->SetOpusMaxBandwidth(channel_, 8000));
- EXPECT_EQ(0, voe_codec_->SetOpusMaxBandwidth(channel_, 4000));
+ 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, OpusMaxBandwidthCannotBeSetForNonOpus) {
+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_->SetOpusMaxBandwidth(channel_, 16000));
+ EXPECT_EQ(-1, voe_codec_->SetOpusMaxPlaybackRate(channel_, 16000));
}
}
diff --git a/voice_engine/test/cmd_test/Android.mk b/voice_engine/test/cmd_test/Android.mk
deleted file mode 100644
index f1a4f1af..00000000
--- 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 b5d2dca8..09a70a9d 100644
--- a/voice_engine/test/cmd_test/voe_cmd_test.cc
+++ b/voice_engine/test/cmd_test/voe_cmd_test.cc
@@ -445,7 +445,7 @@ void RunTest(std::string out_path) {
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 audio bandwidth \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++);
@@ -761,10 +761,10 @@ void RunTest(std::string out_path) {
printf("\n Opus mono enabled (select Opus again to apply the "
"setting). \n");
} else if (option_selection == option_index++) {
- printf("\n Input bandwidth in Hz: ");
+ printf("\n Input maxium playback rate in Hz: ");
int max_playback_rate;
ASSERT_EQ(1, scanf("%i", &max_playback_rate));
- res = codec->SetOpusMaxBandwidth(chan, max_playback_rate);
+ res = codec->SetOpusMaxPlaybackRate(chan, max_playback_rate);
VALIDATE;
} else if (option_selection == option_index++) {
res = codec->GetSendCodec(chan, cinst);
diff --git a/voice_engine/voe_codec_impl.cc b/voice_engine/voe_codec_impl.cc
index 50994070..6f470be1 100644
--- a/voice_engine/voe_codec_impl.cc
+++ b/voice_engine/voe_codec_impl.cc
@@ -418,10 +418,10 @@ int VoECodecImpl::GetVADStatus(int channel, bool& enabled, VadModes& mode,
return 0;
}
-int VoECodecImpl::SetOpusMaxBandwidth(int channel, int bandwidth_hz) {
+int VoECodecImpl::SetOpusMaxPlaybackRate(int channel, int frequency_hz) {
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
- "SetOpusMaxBandwidth(channel=%d, bandwidth_hz=%d)", channel,
- bandwidth_hz);
+ "SetOpusMaxPlaybackRate(channel=%d, frequency_hz=%d)", channel,
+ frequency_hz);
if (!_shared->statistics().Initialized()) {
_shared->SetLastError(VE_NOT_INITED, kTraceError);
return -1;
@@ -430,10 +430,10 @@ int VoECodecImpl::SetOpusMaxBandwidth(int channel, int bandwidth_hz) {
voe::Channel* channelPtr = ch.channel();
if (channelPtr == NULL) {
_shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
- "SetOpusMaxBandwidth failed to locate channel");
+ "SetOpusMaxPlaybackRate failed to locate channel");
return -1;
}
- return channelPtr->SetOpusMaxBandwidth(bandwidth_hz);
+ return channelPtr->SetOpusMaxPlaybackRate(frequency_hz);
}
void VoECodecImpl::ACMToExternalCodecRepresentation(CodecInst& toInst,
diff --git a/voice_engine/voe_codec_impl.h b/voice_engine/voe_codec_impl.h
index 498854d8..f001df86 100644
--- a/voice_engine/voe_codec_impl.h
+++ b/voice_engine/voe_codec_impl.h
@@ -54,7 +54,7 @@ public:
VadModes& mode,
bool& disabledDTX);
- virtual int SetOpusMaxBandwidth(int channel, int bandwidth_hz);
+ virtual int SetOpusMaxPlaybackRate(int channel, int frequency_hz);
// Dual-streaming
virtual int SetSecondarySendCodec(int channel, const CodecInst& codec,
diff --git a/voice_engine/voice_engine.gyp b/voice_engine/voice_engine.gyp
index 43296ff3..deed467a 100644
--- a/voice_engine/voice_engine.gyp
+++ b/voice_engine/voice_engine.gyp
@@ -132,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',
],
@@ -274,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 b4aa6960..d6fe0da1 100644
--- a/voice_engine/voice_engine.target.darwin-arm.mk
+++ b/voice_engine/voice_engine.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -56,7 +55,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -70,13 +68,13 @@ MY_CFLAGS_Debug := \
-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 \
@@ -91,6 +89,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -114,12 +113,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +169,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -184,7 +187,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -198,13 +200,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -242,12 +244,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +301,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -314,50 +320,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 5a5103aa..58c0c9e0 100644
--- a/voice_engine/voice_engine.target.darwin-arm64.mk
+++ b/voice_engine/voice_engine.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -55,7 +54,6 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -81,6 +79,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -103,12 +102,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +155,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -168,7 +171,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -216,12 +218,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +272,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -284,42 +290,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 cedc275f..024d9a39 100644
--- a/voice_engine/voice_engine.target.darwin-mips.mk
+++ b/voice_engine/voice_engine.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -56,7 +55,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -70,8 +68,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -86,6 +82,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -109,12 +106,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +161,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -178,7 +179,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -192,8 +192,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -231,12 +229,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +285,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -302,46 +304,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/voice_engine/voice_engine.target.darwin-x86.mk
index e56d2950..a2232c2b 100644
--- a/voice_engine/voice_engine.target.darwin-x86.mk
+++ b/voice_engine/voice_engine.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -55,7 +54,6 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -86,6 +84,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -109,12 +108,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +161,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -174,7 +177,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -228,12 +230,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +284,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -296,46 +302,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 7e53d7d1..f248bd85 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 @@ include $(CLEAR_VARS)
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))
@@ -56,7 +55,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -85,6 +83,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -108,12 +107,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +160,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -174,7 +177,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -226,12 +228,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +282,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -294,46 +300,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 b4aa6960..d6fe0da1 100644
--- a/voice_engine/voice_engine.target.linux-arm.mk
+++ b/voice_engine/voice_engine.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -56,7 +55,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -70,13 +68,13 @@ MY_CFLAGS_Debug := \
-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 \
@@ -91,6 +89,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -114,12 +113,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +169,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -184,7 +187,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -198,13 +200,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -242,12 +244,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +301,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -314,50 +320,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 5a5103aa..58c0c9e0 100644
--- a/voice_engine/voice_engine.target.linux-arm64.mk
+++ b/voice_engine/voice_engine.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -55,7 +54,6 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -81,6 +79,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -103,12 +102,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +155,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -168,7 +171,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -216,12 +218,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +272,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -284,42 +290,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 cedc275f..024d9a39 100644
--- a/voice_engine/voice_engine.target.linux-mips.mk
+++ b/voice_engine/voice_engine.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -56,7 +55,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -70,8 +68,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -86,6 +82,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -109,12 +106,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +161,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -178,7 +179,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -192,8 +192,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -231,12 +229,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +285,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -302,46 +304,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/voice_engine/voice_engine.target.linux-x86.mk
index e56d2950..a2232c2b 100644
--- a/voice_engine/voice_engine.target.linux-x86.mk
+++ b/voice_engine/voice_engine.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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))
@@ -55,7 +54,6 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -86,6 +84,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -109,12 +108,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +161,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -174,7 +177,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -228,12 +230,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +284,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -296,46 +302,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 7e53d7d1..f248bd85 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 @@ include $(CLEAR_VARS)
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))
@@ -56,7 +55,6 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -85,6 +83,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -108,12 +107,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +160,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -174,7 +177,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -226,12 +228,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +282,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -294,46 +300,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 d50552d9..dee366ce 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 8e6c76db..1d7d52b5 100644
--- a/webrtc.target.darwin-arm.mk
+++ b/webrtc.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -52,13 +50,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -96,12 +95,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +141,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -156,7 +159,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -170,13 +172,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -214,12 +216,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +263,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -276,50 +282,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 ee9380b8..c77cc9a2 100644
--- a/webrtc.target.darwin-arm64.mk
+++ b/webrtc.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -63,6 +61,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -85,12 +84,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +127,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -140,7 +143,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -188,12 +190,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -229,6 +234,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -246,42 +252,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 6deaa878..561d8e2d 100644
--- a/webrtc.target.darwin-mips.mk
+++ b/webrtc.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -52,8 +50,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -68,6 +64,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -91,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +133,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +151,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -164,8 +164,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -203,12 +201,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +247,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -264,46 +266,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/webrtc.target.darwin-x86.mk
index 29899230..c16fa019 100644
--- a/webrtc.target.darwin-x86.mk
+++ b/webrtc.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -68,6 +66,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -91,12 +90,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +133,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -146,7 +149,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -200,12 +202,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +246,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -258,46 +264,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 9fd92b08..ab30dcc4 100644
--- a/webrtc.target.darwin-x86_64.mk
+++ b/webrtc.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +132,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -146,7 +149,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -198,12 +200,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +244,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -256,46 +262,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 8e6c76db..1d7d52b5 100644
--- a/webrtc.target.linux-arm.mk
+++ b/webrtc.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -52,13 +50,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -96,12 +95,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +141,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -156,7 +159,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -170,13 +172,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -214,12 +216,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +263,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -276,50 +282,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 ee9380b8..c77cc9a2 100644
--- a/webrtc.target.linux-arm64.mk
+++ b/webrtc.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -63,6 +61,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -85,12 +84,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +127,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -140,7 +143,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -188,12 +190,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-DVIDEO_HOLE=1' \
+ '-DENABLE_LOAD_COMPLETION_HACKS=1' \
'-DWEBRTC_RESTRICT_LOGGING' \
+ '-DEXPAT_RELATIVE_PATH' \
'-DWEBRTC_MODULE_UTILITY_VIDEO' \
'-DWEBRTC_CHROMIUM_BUILD' \
'-DLOGGING_INSIDE_WEBRTC' \
@@ -229,6 +234,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -246,42 +252,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 6deaa878..561d8e2d 100644
--- a/webrtc.target.linux-mips.mk
+++ b/webrtc.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -52,8 +50,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -68,6 +64,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -91,12 +88,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +133,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +151,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -164,8 +164,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -203,12 +201,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +247,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -264,46 +266,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/webrtc.target.linux-x86.mk
index 29899230..c16fa019 100644
--- a/webrtc.target.linux-x86.mk
+++ b/webrtc.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -68,6 +66,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -91,12 +90,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +133,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -146,7 +149,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -200,12 +202,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +246,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -258,46 +264,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 9fd92b08..ab30dcc4 100644
--- a/webrtc.target.linux-x86_64.mk
+++ b/webrtc.target.linux-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -67,6 +65,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +132,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -146,7 +149,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -198,12 +200,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +244,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -256,46 +262,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 9cb15774..5346074f 100644
--- a/webrtc_common.target.darwin-arm.mk
+++ b/webrtc_common.target.darwin-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -46,13 +44,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +135,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +153,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -164,13 +166,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -208,12 +210,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +257,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -270,50 +276,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 c0eb434f..41deb722 100644
--- a/webrtc_common.target.darwin-arm64.mk
+++ b/webrtc_common.target.darwin-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -57,6 +55,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -79,12 +78,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +121,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -134,7 +137,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -182,12 +184,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +228,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -240,42 +246,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 4ae3965f..892134a8 100644
--- a/webrtc_common.target.darwin-mips.mk
+++ b/webrtc_common.target.darwin-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -46,8 +44,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -62,6 +58,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -85,12 +82,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +127,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -144,7 +145,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -158,8 +158,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -197,12 +195,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +241,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -258,46 +260,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/webrtc_common.target.darwin-x86.mk
index b869ff01..3eacddd8 100644
--- a/webrtc_common.target.darwin-x86.mk
+++ b/webrtc_common.target.darwin-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -62,6 +60,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -85,12 +84,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +127,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -140,7 +143,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -194,12 +196,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +240,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -252,46 +258,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 1e55a380..a32ce3dc 100644
--- a/webrtc_common.target.darwin-x86_64.mk
+++ b/webrtc_common.target.darwin-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,6 +59,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -84,12 +83,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +126,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -140,7 +143,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -192,12 +194,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +238,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -250,46 +256,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 9cb15774..5346074f 100644
--- a/webrtc_common.target.linux-arm.mk
+++ b/webrtc_common.target.linux-arm.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -46,13 +44,13 @@ MY_CFLAGS_Debug := \
-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 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -90,12 +89,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +135,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -150,7 +153,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -164,13 +166,13 @@ MY_CFLAGS_Release := \
-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 \
@@ -208,12 +210,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +257,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -270,50 +276,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 c0eb434f..41deb722 100644
--- a/webrtc_common.target.linux-arm64.mk
+++ b/webrtc_common.target.linux-arm64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -57,6 +55,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-funwind-tables
@@ -79,12 +78,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +121,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -134,7 +137,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -182,12 +184,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +228,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -240,42 +246,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 4ae3965f..892134a8 100644
--- a/webrtc_common.target.linux-mips.mk
+++ b/webrtc_common.target.linux-mips.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -46,8 +44,6 @@ MY_CFLAGS_Debug := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -62,6 +58,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -85,12 +82,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +127,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -144,7 +145,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -158,8 +158,6 @@ MY_CFLAGS_Release := \
-fno-builtin-sin \
-fno-builtin-cosf \
-fno-builtin-sinf \
- -EL \
- -mhard-float \
-ffunction-sections \
-funwind-tables \
-g \
@@ -197,12 +195,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +241,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -258,46 +260,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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-x86.mk b/webrtc_common.target.linux-x86.mk
index b869ff01..3eacddd8 100644
--- a/webrtc_common.target.linux-x86.mk
+++ b/webrtc_common.target.linux-x86.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ LOCAL_SRC_FILES := \
MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -62,6 +60,7 @@ MY_CFLAGS_Debug := \
-fno-stack-protector \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -85,12 +84,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +127,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -140,7 +143,6 @@ LOCAL_CPPFLAGS_Debug := \
MY_CFLAGS_Release := \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -194,12 +196,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +240,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -252,46 +258,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 1e55a380..a32ce3dc 100644
--- a/webrtc_common.target.linux-x86_64.mk
+++ b/webrtc_common.target.linux-x86_64.mk
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
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 @@ MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -61,6 +59,7 @@ MY_CFLAGS_Debug := \
-Wno-unused-but-set-variable \
-Os \
-g \
+ -gdwarf-4 \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
@@ -84,12 +83,15 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +126,7 @@ LOCAL_C_INCLUDES_Debug := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -140,7 +143,6 @@ MY_CFLAGS_Release := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-Werror \
- -fno-exceptions \
-fno-strict-aliasing \
-Wall \
-Wno-unused-parameter \
@@ -192,12 +194,15 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DDATA_REDUCTION_FALLBACK_HOST="http://compress.googlezip.net:80/"' \
- '-DDATA_REDUCTION_DEV_HOST="http://proxy-dev.googlezip.net:80/"' \
+ '-DDATA_REDUCTION_DEV_HOST="https://proxy-dev.googlezip.net:443/"' \
+ '-DDATA_REDUCTION_DEV_FALLBACK_HOST="http://proxy-dev.googlezip.net:80/"' \
'-DSPDY_PROXY_AUTH_ORIGIN="https://proxy.googlezip.net:443/"' \
'-DDATA_REDUCTION_PROXY_PROBE_URL="http://check.googlezip.net/connect"' \
'-DDATA_REDUCTION_PROXY_WARMUP_URL="http://www.gstatic.com/generate_204"' \
'-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,6 +238,7 @@ LOCAL_C_INCLUDES_Release := \
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
+ -fno-exceptions \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -250,46 +256,6 @@ LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
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 e8d1b982..1af259c1 100644
--- a/webrtc_examples.gyp
+++ b/webrtc_examples.gyp
@@ -15,6 +15,8 @@
'type': 'loadable_module',
'dependencies': [
'<(DEPTH)/third_party/icu/icu.gyp:icuuc',
+ '<(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',
@@ -130,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 ace66843..1d862c65 100644
--- a/webrtc_tests.gypi
+++ b/webrtc_tests.gypi
@@ -8,6 +8,16 @@
{
'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': [
@@ -38,6 +48,7 @@
'<(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',
],
@@ -61,9 +72,10 @@
'dependencies': [
'<(DEPTH)/testing/gtest.gyp:gtest',
'<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
- 'system_wrappers/source/system_wrappers.gyp:field_trial_default',
'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',
],
},
@@ -80,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',
],
@@ -113,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',
],
@@ -128,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',