Commit Graph

155 Commits

Author SHA1 Message Date
cc91d284e4 Moved RtcEventLog files from call/ to logging/
The RtcEventLog headers need to be accessible from any place which needs
logging, and the implementation needs access to data structures that are
logged.

After a discussion in the code review, we all agreed to move the RtcEventLog implementation into its own top level directory - which I called "logging/" in expectation that other types of logging may have similar requirements. The directory contains two main build targets - "rtc_event_log_api", which is just rtc_event_log.h, that has no external dependencies and can be used from anywhere, and "rtc_event_log_impl" which contains the rest of the implementation and has many dependencies (more in the future).

The "api" target can be referenced from anywhere, while the "impl" target is only needed at the place of instantiation (currently Call, soon to be moved to PeerConnection by https://codereview.webrtc.org/2353033005/).

This change allows using RtcEventLog in the p2p/ directory, so that we
can log STUN pings and ICE state transitions.

BUG=webrtc:6393
R=kjellander@webrtc.org, kwiberg@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, terelius@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14485}
2016-10-04 01:31:32 +00:00
a1d9ad0b58 Creating controller manager from config string in audio network adaptor.
BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2364403004
Cr-Commit-Position: refs/heads/master@{#14466}
2016-10-02 21:53:45 +00:00
89a3a1a363 Moved Gn target rtc_event_log to one directory above.
This is done to ensure GN targets are placed in the same directory as of the source files.

BUG=webrtc:6412
NOTRY=True

Review-Url: https://codereview.webrtc.org/2365383004
Cr-Commit-Position: refs/heads/master@{#14411}
2016-09-28 07:49:04 +00:00
46a8d18efa ACM: Removed the code for InitialDelayManager
It looks to have been unused since the landing of
https://codereview.webrtc.org/1419573013

BUG=webrtc:3520

Review-Url: https://codereview.webrtc.org/2363993002
Cr-Commit-Position: refs/heads/master@{#14397}
2016-09-27 12:43:37 +00:00
29a44e351e This is a resubmission of https://codereview.webrtc.org/2047513002/
Original description:
Add proper lifetime of encoder-specific settings.

Permits passing VideoEncoderConfig between threads and not worry about
the lifetime of an underlying void pointer. Also adds type safety to
unpacking of codec-specific settings.

These settings are not yet propagating to VideoEncoder interfaces, but
the aim is to get rid of webrtc::VideoCodec for VideoEncoder.

BUG=webrtc:3424
R=perkj@webrtc.org, pbos@webrtc.org
TBR=mflodman@webrtc.org

Review-Url: https://codereview.webrtc.org/2347843002
Cr-Commit-Position: refs/heads/master@{#14396}
2016-09-27 10:52:05 +00:00
b62dbbe985 GN: Change rtc_source_set targets --> rtc_static_library
This changes most non-test related rtc_source_set targets to be
rtc_static_library instead. Targets without any .cc files are excluded.
This should bring back the build behavior we used to have with GYP
(i.e. same symbols exported in the libjingle_peerconnection.a file, which
are used by some downstream projects).

After doing an Android build with these changes:
$ nm --defined-only -g -C out/Release/lib.unstripped/libjingle_peerconnection_so.so | grep -i createpeerconnectionf
00077c51 T Java_org_webrtc_PeerConnectionFactory_nativeCreatePeerConnectionFactory
$ nm --defined-only -g -C out/Release/obj/webrtc/api/libjingle_peerconnection.a | grep -i createpeerconnectionf
00000001 T webrtc::CreatePeerConnectionFactory(rtc::Thread*, rtc::Thread*, rtc::Thread*, webrtc::AudioDeviceModule*, cricket::WebRtcVideoEncoderFactory*, cricket::WebRtcVideoDecoderFactory*)
00000001 T webrtc::CreatePeerConnectionFactory()

See https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/cookbook.md#Note-on-static-libraries
for more details on this.

NOTICE: This should be further cleaned up in the future, to reduce
binary bloat and unnecessary linking time. Right now it's more
important to restore the desired build output though.

BUG=webrtc:6410, chromium:630755

Review-Url: https://codereview.webrtc.org/2361623004
Cr-Commit-Position: refs/heads/master@{#14364}
2016-09-23 07:38:58 +00:00
25f6a39181 Relanding of "Adding debug dump to audio network adaptor."
The original CL was https://codereview.webrtc.org/2356763002

but got reverted https://codereview.webrtc.org/2362003002/.

The error was that ana_debug_dump_proto as a proto_library was placed under rtc_include_tests.

BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2365723002
Cr-Commit-Position: refs/heads/master@{#14363}
2016-09-23 05:23:28 +00:00
161b3907ab Revert of Adding debug dump to audio network adaptor. (patchset #5 id:140001 of https://codereview.webrtc.org/2356763002/ )
Reason for revert:
Chromium bot fails

Original issue's description:
> Adding debug dump to audio network adaptor.
>
> BUG=webrtc:6303
>
> Committed: https://crrev.com/7e4f8928062afc8d571bb69f3223711701cbaad6
> Cr-Commit-Position: refs/heads/master@{#14361}

TBR=michaelt@webrtc.org,kwiberg@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2362003002
Cr-Commit-Position: refs/heads/master@{#14362}
2016-09-22 21:17:01 +00:00
7e4f892806 Adding debug dump to audio network adaptor.
BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2356763002
Cr-Commit-Position: refs/heads/master@{#14361}
2016-09-22 20:39:18 +00:00
d0ede4493e Adding FecController to audio network adaptor.
BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2337103006
Cr-Commit-Position: refs/heads/master@{#14351}
2016-09-22 13:20:59 +00:00
a70695a3e1 Moved Opus-specific payload splitting into AudioDecoderOpus.
The biggest change to NetEq is the move from a primary flag, to a
Priority with two separate levels: one set by RED splitting and one
set by the codec itself. This allows us to unambigously prioritize
"fallback" packets from these two sources. I've chosen what I believe
is the sensible ordering: packets that the codec prioritizes are
chosen first, regardless of if they are secondary RED packets or
not. So if we were to use Opus w/ FEC in RED, we'd only do Opus FEC
decoding if there was no RED packet that could cover the time slot.

With this change, PayloadSplitter now only deals with RED
packets. Maybe it should be renamed RedPayloadSplitter?

BUG=webrtc:5805

Review-Url: https://codereview.webrtc.org/2342443005
Cr-Commit-Position: refs/heads/master@{#14347}
2016-09-22 09:07:03 +00:00
4aec1d4437 Relanding of "Adding BitrateController to audio network adaptor."
Adding BitrateController to audio network adaptor was first landed in https://codereview.webrtc.org/2334613002/ but reverted in https://codereview.webrtc.org/2352223002/ due to ODR violation.

This CL tries to use namespace trick to solve the ODR problem.

BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2353293002
Cr-Commit-Position: refs/heads/master@{#14343}
2016-09-22 06:01:34 +00:00
e35d329315 Adding FrameLengthController to audio network adaptor.
BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2335163002
Cr-Commit-Position: refs/heads/master@{#14339}
2016-09-21 23:00:38 +00:00
7f40ba4414 Moved legacy_encoded_audio_frame into audio_decoder_interface.
audio_decoder.cc depends on LegacyEncodedAudioFrame and
LegacyEncodedAudioFrame depends on AudioDecoder::EncodedAudioFrame, so
there's no clear way to separate them as of now. This error is also
hodling up builds downstream. I expect we'll revisit these
dependencies as part of the upcoming larger restructuring effort.

NOTRY=true
BUG=webrtc:5805

Review-Url: https://codereview.webrtc.org/2359763002
Cr-Commit-Position: refs/heads/master@{#14329}
2016-09-21 12:50:45 +00:00
33b96b3588 Revert of Adding BitrateController to audio network adaptor. (patchset #7 id:140001 of https://codereview.webrtc.org/2334613002/ )
Reason for revert:
ODR violation

Original issue's description:
> Adding BitrateController to audio network adaptor.
>
> BUG=webrtc:6303
>
> Committed: https://crrev.com/26b039a137be0a8703766f45b546b29323de714f
> Cr-Commit-Position: refs/heads/master@{#14293}

TBR=michaelt@webrtc.org,henrik.lundin@webrtc.org,krasin@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2352223002
Cr-Commit-Position: refs/heads/master@{#14327}
2016-09-21 11:30:23 +00:00
0d526d558b Moved codec-specific audio packet splitting into decoders.
There's still some code run specifically for Opus w/ FEC. It will be
addressed in a separate CL.

BUG=webrtc:5805

Review-Url: https://codereview.webrtc.org/2326003002
Cr-Commit-Position: refs/heads/master@{#14319}
2016-09-21 08:57:36 +00:00
3548357e1b Adding SmoothingFilter to audio network adaptor.
BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2339523002
Cr-Commit-Position: refs/heads/master@{#14313}
2016-09-21 06:13:16 +00:00
26b039a137 Adding BitrateController to audio network adaptor.
BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2334613002
Cr-Commit-Position: refs/heads/master@{#14293}
2016-09-19 16:56:43 +00:00
186cd06512 Adding DTX controller to audio network adaptor.
BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2320093002
Cr-Commit-Position: refs/heads/master@{#14260}
2016-09-16 12:54:47 +00:00
c26f77f5a6 Remove a couple of unnecessary dependencies on gflags
BUG=webrtc:5447, chromium:645069
NOTRY=True

Review-Url: https://codereview.webrtc.org/2335683002
Cr-Commit-Position: refs/heads/master@{#14221}
2016-09-15 07:05:00 +00:00
f807a521fa iSAC: Remove unnecessary WEBRTC_LINUX define
Similar to https://codereview.webrtc.org/1539883002
but for GN. This was discovered during GN vs GYP auditing.

NOTRY=True
BUG=webrtc:6323

Review-Url: https://codereview.webrtc.org/2344633002
Cr-Commit-Position: refs/heads/master@{#14220}
2016-09-15 06:15:55 +00:00
2e164c6b53 Adding ChannelController to audio network adaptor.
BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2319873002
Cr-Commit-Position: refs/heads/master@{#14216}
2016-09-14 13:47:39 +00:00
3a7f35b1c4 GN: Declare resources for targets.
Declare resources for GN targets so that they can be isolated

NOTRY=True
BUG=chromium:497757

Review-Url: https://codereview.webrtc.org/2340753002
Cr-Commit-Position: refs/heads/master@{#14210}
2016-09-14 12:10:06 +00:00
caa9cb2cea Adding basic implementation of AudioNetworkAdaptor.
The basic implementation of AudioNetworkAdaptor include the introduction of
  1. Controller
  2. ControllerManager

ControllerManager is to hold all needed controllers. It also orders them according to their significance in dealing with current network condition.

Controller provides an interface MakeDecision, which has to be implemented by specific controllers. AudioNetworkAdaptorImpl calls MakeDecision of the controllers in the order decided by ControllerManager to collect EncoderRuntimeConfig.

BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2306083002
Cr-Commit-Position: refs/heads/master@{#14201}
2016-09-13 20:34:22 +00:00
22c8d5a3e0 Revert of Setting up an RTP input fuzzer for NetEq (patchset #2 id:20001 of https://codereview.webrtc.org/2315633002/ )
Reason for revert:
Broke all Chromium libFuzzer builds
https://bugs.chromium.org/p/chromium/issues/detail?id=645069

Original issue's description:
> Setting up an RTP input fuzzer for NetEq
>
> This CL introduces a new fuzzer target neteq_rtp_fuzzer that
> manipulates the RTP header fields before inserting the packets into
> NetEq. A few helper classes are also introduced.
>
> BUG=webrtc:5447
> NOTRY=True
>
> Committed: https://crrev.com/2d273f1e97cd5030ed1686f27ce1118291b66395
> Cr-Commit-Position: refs/heads/master@{#14103}

TBR=ivoc@webrtc.org,kjellander@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5447

Review-Url: https://codereview.webrtc.org/2328483002
Cr-Commit-Position: refs/heads/master@{#14131}
2016-09-08 12:00:41 +00:00
7610f85a2b Adding AudioNetworkAdaptor interfaces.
AudioNetworkAdaptor is supposed to facilitate AudioEncoder to adapt to varying network conditions.

This is the first of a sequence of CLs that are to add one implementation of AudioNetworkAdaptor.

This CL illustrates the interfaces of the AudioNetworkAdaptor.

BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2308573002
Cr-Commit-Position: refs/heads/master@{#14115}
2016-09-07 20:51:59 +00:00
2d273f1e97 Setting up an RTP input fuzzer for NetEq
This CL introduces a new fuzzer target neteq_rtp_fuzzer that
manipulates the RTP header fields before inserting the packets into
NetEq. A few helper classes are also introduced.

BUG=webrtc:5447
NOTRY=True

Review-Url: https://codereview.webrtc.org/2315633002
Cr-Commit-Position: refs/heads/master@{#14103}
2016-09-07 12:57:34 +00:00
e9cc686293 GN Templates: Move common_inherited_config to the template.
Remove common_inherited_config from the targets and add it to the
template instead.

BUG=webrtc:6187
NOTRY=True

Review-Url: https://codereview.webrtc.org/2311843002
Cr-Commit-Position: refs/heads/master@{#14069}
2016-09-05 13:10:23 +00:00
59af8b7714 GN Templates: Use the optimize_max compiler config.
Add "//build/config/compiler:optimize_max" to rtc_add_configs and
"//build/config/compiler:default_optimization" to rtc_remove_configs.

This is the default optimization in GYP, and might help explain a 82.5%
regression in webrtc_perf_tests at 13946:13946

BUG=chromium:641966
NOTRY=True

Review-Url: https://codereview.webrtc.org/2307283002
Cr-Commit-Position: refs/heads/master@{#14067}
2016-09-05 09:48:58 +00:00
7a2ce0b738 GN Templates: Move common_config to the template.
Remove common_config from the targets' config and add
it to the template instead.

BUG=webrtc:6187
NOTRY=True

Review-Url: https://codereview.webrtc.org/2300413002
Cr-Commit-Position: refs/heads/master@{#14063}
2016-09-05 08:35:48 +00:00
1dd2335023 GN Templates: Add //build/config/sanitizers:deps to rtc_executable.
Remove //build/config/sanitizers:deps as a dependency for
all rtc_executable targets and add it to the template instead.

BUG=webrtc:6187
NOTRY=True

Review-Url: https://codereview.webrtc.org/2308553002
Cr-Commit-Position: refs/heads/master@{#14048}
2016-09-02 14:03:23 +00:00
38a2132b02 GN: Introduce templates.
Defines the rtc_executable, rtc_source_set, rtc_test and
rtc_static_library templates.

These templates provide no functionality yet, but will enable common
configuration to be introduced, avoiding repetition in every target

Changes summary:
- Prepend rtc_ to test, source_set, executable and static_library targets
- Change "configs -= [" to "suppressed_configs += ["
- Include webrtc/build/webrtc.gni where it wasn't included yet
- Delete import("//testing/test.gni"), since rtc_test makes it unnecessary.

BUG=webrtc:6187
TBR=henrik.lundin@webrtc.org,tommi@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2301053002
Cr-Commit-Position: refs/heads/master@{#14043}
2016-09-02 11:10:41 +00:00
25f32e723a Use max optimization when compiling neteq_performance_test.
The compiler optimization for Windows is O1 by default in GN, but O2 in GYP.
This might help explain the regression observed on neteq_performance_unittest.

NOTRY=True
BUG=641966

Review-Url: https://codereview.webrtc.org/2291253003
Cr-Commit-Position: refs/heads/master@{#13999}
2016-08-31 15:22:13 +00:00
32c4a20df7 GN: Fix resource files for iOS test target
In order to get resource files to be properly packaged into
the .app for a unit test on iOS, the resource files needs
to be listed as sources in a bundle_data target.

BUG=webrtc:5949
NOTRY=True

Review-Url: https://codereview.webrtc.org/2292853002
Cr-Commit-Position: refs/heads/master@{#13968}
2016-08-30 09:53:54 +00:00
65fc8b9138 Fix Chromium clang plugin warnings
NOTRY=true
BUG=webrtc:163

Review-Url: https://codereview.webrtc.org/2291503002
Cr-Commit-Position: refs/heads/master@{#13959}
2016-08-29 17:05:34 +00:00
b8e56ee320 Fix Chromium clang plugin warnings
This adds a new file, webrtc/modules/audio_coding/neteq/tools/packet_source.cc, so that I'll have somewhere to put the new non-inlined methods.

NOTRY=true
BUG=webrtc:163

Review-Url: https://codereview.webrtc.org/2290593002
Cr-Commit-Position: refs/heads/master@{#13956}
2016-08-29 13:37:42 +00:00
36a43887f3 Fix Chromium clang plugin warnings
NOTRY=true
BUG=webrtc:163

Review-Url: https://codereview.webrtc.org/2286063005
Cr-Commit-Position: refs/heads/master@{#13955}
2016-08-29 12:33:36 +00:00
cfee215b23 Migrated ILBC and ISAC test targets for GN.
Migrated GN targets ilbc_test, isac_api_test,
isac_switch_samprate_test from webrtc/modules/audio_coding/codecs

NOTRY=True
NOPRESUBMIT=True

BUG=webrtc:6191

Review-Url: https://codereview.webrtc.org/2270403002
Cr-Commit-Position: refs/heads/master@{#13953}
2016-08-29 11:09:28 +00:00
d02fe4b53b GN: Fix windows clang errors. Attempt 2.
BUG=webrtc:6255
NOTRY=True

Review-Url: https://codereview.webrtc.org/2281513002
Cr-Commit-Position: refs/heads/master@{#13942}
2016-08-26 20:31:34 +00:00
4805231613 Moved format_macros.h from rtc_base to rtc_base_approved.
BUG=webrtc:3806
NOTRY=True

Review-Url: https://codereview.webrtc.org/2272003002
Cr-Commit-Position: refs/heads/master@{#13921}
2016-08-25 11:43:52 +00:00
19319a3a2e Add missing "//build/config/sanitizers:deps" to executable targets.
BUG=webrtc:6215
NOTRY=True

Review-Url: https://codereview.webrtc.org/2278723004
Cr-Commit-Position: refs/heads/master@{#13915}
2016-08-25 09:44:11 +00:00
28a0ffdd52 GN: Synchronize resources between Android and iOS.
iOS tests packaged into an .app uses the same way of
defining resources (the data attribute). Some iOS
simulator tests are failing due to missing resources, so
let's sync them all.

BUG=webrtc:5949
NOTRY=True

Review-Url: https://codereview.webrtc.org/2277753003
Cr-Commit-Position: refs/heads/master@{#13898}
2016-08-24 14:48:48 +00:00
2c670dbf13 Added GN target for webrtc_opus_fec_test.
BUG=webrtc:6191
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2268213002
Cr-Commit-Position: refs/heads/master@{#13893}
2016-08-24 13:11:27 +00:00
619a211562 iLBC: Handle a case of bad input data
We detect an unreasonable state (caused by a bad encoded stream)
before it can lead to problems, and handle it by resetting the
decoder.

NOPRESUBMIT=true
BUG=chromium:617124

Review-Url: https://codereview.webrtc.org/2255203002
Cr-Commit-Position: refs/heads/master@{#13888}
2016-08-24 09:46:48 +00:00
e51b41ae44 Added GN target for isac_test.
BUG=webrtc:6191
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2267423002
Cr-Commit-Position: refs/heads/master@{#13884}
2016-08-24 09:26:04 +00:00
9a11784a7f Migrated GN target :g722_test
Migrated GN target :g722_test from
webrtc/modules/audio_coding/codecs/g722/g722.gypi

NOTRY=True

BUG=webrtc:6191

Review-Url: https://codereview.webrtc.org/2275463002
Cr-Commit-Position: refs/heads/master@{#13865}
2016-08-23 15:36:15 +00:00
16f55a10c4 Migrated GN target :g711_test
Migrated GN target :g711_test from
webrtc/modules/audio_coding/codecs/g711/g711.gypi

NOTRY=True

BUG=webrtc:6191

Review-Url: https://codereview.webrtc.org/2273623002
Cr-Commit-Position: refs/heads/master@{#13864}
2016-08-23 15:08:30 +00:00
6c46eaa544 Add gtest as a dependency for neteq_quality_test_support.
Was removed in Patch Set 5 of https://codereview.webrtc.org/2252413002
but shouldn't have been, since it's actually required.

https://cs.chromium.org/chromium/src/third_party/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.h?l=17

BUG=webrtc:6228
NOTRY=True

Review-Url: https://codereview.webrtc.org/2262173003
Cr-Commit-Position: refs/heads/master@{#13851}
2016-08-22 16:48:11 +00:00
861da3c662 Refactor neteq_test_support.
Take 'tools/neteq_quality_test.cc' and 'tools/neteq_quality_test.h' outside of neteq_test_support into their own target, neteq_quality_test_support.

BUG=webrtc:6228
NOTRY=True

Review-Url: https://codereview.webrtc.org/2252413002
Cr-Commit-Position: refs/heads/master@{#13831}
2016-08-19 14:02:31 +00:00
bcba64a0fa GN: Add "//build/config/sanitizers:deps" as a dependency to executable targets.
When the sanitizer bots are switched to GN, this needs to be included as a dependency so that the executables can be compiled.

BUG=webrtc:6215
NOTRY=True

Review-Url: https://codereview.webrtc.org/2250893003
Cr-Commit-Position: refs/heads/master@{#13829}
2016-08-19 09:11:15 +00:00