98 Commits

Author SHA1 Message Date
hbos
db346a7cbe RTCStatsIntegrationTest added.
This is an integration test using peerconnectiontestwrapper.h to set up
and end to end test using a real PeerConnection implementation. These
tests will complement rtcstatscollector_unittest.cc which collects all
stats using mocks.

The integration test is set up so that all stats types are returned by
GetStats and verifies that expected dictionary members are defined. The
test could in the future be updated to include sanity checks for the
values of members. There is a sanity check that references to other
stats dictionaries yield existing stats of the appropriate type, but
other than that members are only tested for if they are defined not.

StatsCallback of rtcstatscollector_unittest.cc is moved so that it can
be reused and renamed to RTCStatsObtainer.

TODO: Audio stream track stats members are missing in the test. Find out
if this is because of a real problem or because of testing without real
devices. Do this before closing crbug.com/627816.

BUG=chromium:627816

Review-Url: https://codereview.webrtc.org/2521663002
Cr-Commit-Position: refs/heads/master@{#15287}
2016-11-29 09:57:08 +00:00
aleloi
a8eb756a34 Moved transport.h from webrtc/ to webrtc/api, created build target and updated WebRTC dependencies.
transport.h defines an interface for sending rtp and rtcp packets,
which is used by MediaChannel in webrtc/media/engine,
{Audio|Video}{Send|Receive}Stream and in a few other
places. It was part of the build target //webrtc:webrtc, which is a monolithic target with
all webrtc production code. This CL moves the header to its own target in webrtc/api
and deprecates the old location.

Targets in webrtc/api should in general only depend on other
targets in webrtc/api. The target webrtc/api:call_api depends on
transport.h. This change also makes webrtc/voice_engine pass GN's header
include checker and is needed in order for webrtc/api:call_api to pass
it.

transport.h will be completely removed in a follow-up CL in a few weeks
after clients have updated their includes.

NOTRY=True

BUG=webrtc:5589, webrtc:5878, webrtc:6785

Review-Url: https://codereview.webrtc.org/2426563003
Cr-Commit-Position: refs/heads/master@{#15267}
2016-11-28 15:02:19 +00:00
sakal
08be780512 Reland of Allow custom metrics implementations on Android. (patchset #1 id:1 of https://codereview.webrtc.org/2516403002/ )
Reason for revert:
Fix downstream.

Original issue's description:
> Revert of Allow custom metrics implementations on Android. (patchset #11 id:260001 of https://codereview.webrtc.org/2403463002/ )
>
> Reason for revert:
> Break downstream tests.
>
> Original issue's description:
> > Allow custom metrics implementations on Android.
> >
> > BUG=webrtc:6499
> >
> > Committed: https://crrev.com/de609b26c5fc77fd3388eae5594ee8a634edf8da
> > Cr-Commit-Position: refs/heads/master@{#15169}
>
> TBR=kjellander@webrtc.org,magjed@webrtc.org,sakal@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6499
>
> Committed: https://crrev.com/f570a2804ed8af6f6586f4aea51e089bd55d7e42
> Cr-Commit-Position: refs/heads/master@{#15171}

TBR=kjellander@webrtc.org,magjed@webrtc.org,philipel@webrtc.org
BUG=webrtc:6499

Review-Url: https://codereview.webrtc.org/2518293002
Cr-Commit-Position: refs/heads/master@{#15214}
2016-11-23 15:12:28 +00:00
aleloi
17338d41ac Created an AudioMixer mock in webrtc/api/test.
The mock is used in a dependent CL https://codereview.webrtc.org/2436033002.

There is also a goal to allow external mixing implementations
(subclasses of webrtc::AudioMixer) and inject them to
PeerConnectionFactory. We think that part of that is an official and
maintained mock.

Summary of changes:
    * Created a mixer mock/stub in webrtc/api/test
    * Made a target webrtc/api:mock_audio_mixer for it.

NOTRY=True
BUG=webrtc:6346

Review-Url: https://codereview.webrtc.org/2520323002
Cr-Commit-Position: refs/heads/master@{#15190}
2016-11-22 14:02:12 +00:00
sakal
0ce6aafc32 Move androidvideotracksource from api under api/android/jni.
This file fits there more naturally since it has dependencies to jni.

BUG=None

Review-Url: https://codereview.webrtc.org/2514383002
Cr-Commit-Position: refs/heads/master@{#15179}
2016-11-22 09:26:22 +00:00
sakal
f72331205d Add an empty libjingle_peerconnection_metrics_default_jni target.
This allows downstream dependencies can add it as a dependency.

BUG=webrtc:6499

Review-Url: https://codereview.webrtc.org/2521183002
Cr-Commit-Position: refs/heads/master@{#15178}
2016-11-22 09:25:16 +00:00
philipel
f570a2804e Revert of Allow custom metrics implementations on Android. (patchset #11 id:260001 of https://codereview.webrtc.org/2403463002/ )
Reason for revert:
Break downstream tests.

Original issue's description:
> Allow custom metrics implementations on Android.
>
> BUG=webrtc:6499
>
> Committed: https://crrev.com/de609b26c5fc77fd3388eae5594ee8a634edf8da
> Cr-Commit-Position: refs/heads/master@{#15169}

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

Review-Url: https://codereview.webrtc.org/2516403002
Cr-Commit-Position: refs/heads/master@{#15171}
2016-11-21 16:30:05 +00:00
sakal
de609b26c5 Allow custom metrics implementations on Android.
BUG=webrtc:6499

Review-Url: https://codereview.webrtc.org/2403463002
Cr-Commit-Position: refs/heads/master@{#15169}
2016-11-21 15:41:09 +00:00
Henrik Kjellander
b4af3d673a Remove all references to GYP
Remove all .gyp and .gypi files.
Remove entries from OWNERS files for *.isolate, *.gyp, *.gypi
Remove unused scripts in webrtc/build.

BUG=webrtc:6323
R=henrika@webrtc.org, phoglund@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#15107}
2016-11-16 19:11:38 +00:00
phoglund
613152af11 Add a JNI boot test to catch ARM dynamic linker regressions.
The peer connection loopback test could catch regressions too, but it's
too slow to run on downstream ARM emulators. I'm adding a test here
that just makes sure we can load the JNI and init audio/video engines
in WebRTC.

This test overlaps in functionality with the existing tests,
but we need it anyway since all existing tests are too timing-sensitive.

Removes resources from the test; they're awkward downstream and we
don't really need them anyway.

BUG=b/32820229

Review-Url: https://codereview.webrtc.org/2506603002
Cr-Commit-Position: refs/heads/master@{#15101}
2016-11-16 09:31:27 +00:00
aleloi
81da488ab6 Added audio mixer and removed audio device module in AudioState::Config.
The audio_device_module field was currently unused. The audio_mixer
field is going to be used to pass an AudioMixer to AudioState.

In the hopefully-not-very-far future, the toplevel WebRTC API will allow passing
a custom AudioMixer, e.g. for spatialized audio (audio in space). If no
mixer is passed, a default mixer is created (the one in modules/audio_mixer).

The only object which will have a permanent reference to the mixer is AudioState.
AudioState is created in WebRTCVoiceEngine with a configuration object,
which already contains a VoiceEngine pointer. In this CL, we extend this
config object with a mixer pointer.

In summary: in an upcoming CL, a mixer will be either created in or passed to
WebRTCVoiceEngine. This mixer will be passed to the ctor of AudioState in a
config struct.

BUG=webrtc:6346
NOTRY=True

Review-Url: https://codereview.webrtc.org/2456363002
Cr-Commit-Position: refs/heads/master@{#14973}
2016-11-08 12:26:37 +00:00
ossu
d4d2f6009e Reinstated sctputils_unittest.cc
As I was preparing to move some files from the api/ folder, I noticed
that this file was not included in the BUILD.gn file. I've added it back
in and updated it to compile and run successfully again.

BUG=webrtc:5883

Review-Url: https://codereview.webrtc.org/2485603002
Cr-Commit-Position: refs/heads/master@{#14965}
2016-11-08 10:05:36 +00:00
kjellander
71a1b61c4f WebRTC: Fix and enable -Woverloaded-virtual warnings.
Essentially applying the same change as in
https://codereview.webrtc.org/2023413002 in more locations.

There's only one change affecting production code: enabling the warning
for webrtc/media:rtc_media. The rest are test changes.

With these changes, the only place the warning is disabled is in the Windows
implementation of webrtc/modules/video_capture:video_capture_internal_impl,
which is harder to fix, since it relies on sample code from the Windows SDK.

BUG=webrtc:6653
NOTRY=True

Review-Url: https://codereview.webrtc.org/2468093004
Cr-Commit-Position: refs/heads/master@{#14938}
2016-11-07 09:18:14 +00:00
sakal
fb0c573263 Android EglRenderer: Add Bitmap frame listener functionality.
BUG=webrtc:6470

Review-Url: https://codereview.webrtc.org/2456873002
Cr-Commit-Position: refs/heads/master@{#14921}
2016-11-03 16:15:41 +00:00
kjellander
6ceab08322 GN: New conventions, default target and refactorings
Introduce a convention on categorizing GN targets:
1. Production code
2. Tests
3. Examples
4. Tools
The first two have targets spread out all over the tree,
while the latter are isolated to examples/ and tools/ directories.

Another new convention: Each directory's BUILD.gn file shall contain
a target named similar to the directory name. This target shall
contain the 'most common' production code, i.e. so that most
consumers of the directory can depend on only the directory
(which implicitly means that target in GN).

//webrtc:webrtc_tests is changed to depend on all WebRTC tests.
From now on, it's necessary to add new test targets to this dependency
tree in order to get them compiled.

Two new group targets are created:
//webrtc/modules/audio_coding:audio_coding_tests
//webrtc/modules/audio_processing:audio_processing_tests
to reduce the long list of tests in //webrtc:webrtc_tests.

Visibility on //webrtc:webrtc and  //webrtc:webrtc_tests is restricted
to the root target, to avoid circular dependencies due to the monolithic
property of these targets (a problem we've had in the past).

The 'root' target at the top level is renamed to 'default', which means GN will
build this target instead of _all_ generated targets
(see https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/faq.md#Can-I-control-what-targets-are-built-by-default).
This target now depends on everything we want to build, meaning all targets now
explicitly needs to be wired up from the root target in order to get build.
Having this, the number of compiled objects on Android is decreased from 8855 to 6276. It also gives us better control over our build.

BUG=webrtc:6440
TESTED=git cl try --clobber
NOTRY=True

Review-Url: https://codereview.webrtc.org/2441383002
Cr-Commit-Position: refs/heads/master@{#14821}
2016-10-28 12:44:07 +00:00
solenberg
940b6d648f Clean up logging in AudioSendStream::SetupSendCodec().
As a side effect:
- Moved the AudioSendStream::Config::SendCodecSpec methods into the .cc.
- Which exposed an issue with event_visualizer_utils not having a dependency on api:call_api set up.
- Which further exposed clang warnings about large inlined default methods in webrtc/config.h.

BUG=webrtc:4690

Committed: https://crrev.com/1836fd6257a692959b3b49ba99ef587ad9995871
Review-Url: https://codereview.webrtc.org/2446963003
Cr-Original-Commit-Position: refs/heads/master@{#14771}
Cr-Commit-Position: refs/heads/master@{#14780}
2016-10-25 18:19:11 +00:00
terelius
189f9b1b65 Revert of Clean up logging in AudioSendStream::SetupSendCodec(). (patchset #3 id:40001 of https://codereview.webrtc.org/2446963003/ )
Reason for revert:
Breaks downstream project

Original issue's description:
> Clean up logging in AudioSendStream::SetupSendCodec().
>
> As a side effect:
> - Moved the AudioSendStream::Config::SendCodecSpec methods into the .cc.
> - Which exposed an issue with event_visualizer_utils not having a dependency on api:call_api set up.
> - Which further exposed clang warnings about large inlined default methods in webrtc/config.h.
>
> BUG=webrtc:4690
>
> Committed: https://crrev.com/1836fd6257a692959b3b49ba99ef587ad9995871
> Cr-Commit-Position: refs/heads/master@{#14771}

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

Review-Url: https://codereview.webrtc.org/2452643002
Cr-Commit-Position: refs/heads/master@{#14774}
2016-10-25 14:56:42 +00:00
solenberg
1836fd6257 Clean up logging in AudioSendStream::SetupSendCodec().
As a side effect:
- Moved the AudioSendStream::Config::SendCodecSpec methods into the .cc.
- Which exposed an issue with event_visualizer_utils not having a dependency on api:call_api set up.
- Which further exposed clang warnings about large inlined default methods in webrtc/config.h.

BUG=webrtc:4690

Review-Url: https://codereview.webrtc.org/2446963003
Cr-Commit-Position: refs/heads/master@{#14771}
2016-10-25 13:44:49 +00:00
sakal
ebf524007f Allow using Java classes that don't require JNI in Chromium.
BUG=webrtc:6584
NOTRY=True

Review-Url: https://codereview.webrtc.org/2439073002
Cr-Commit-Position: refs/heads/master@{#14730}
2016-10-24 07:28:05 +00:00
aleloi
201dfe90a7 Split audio mixer into interface and implementation.
The AudioMixer is now split in a mixer and audio source interface part, which has moved to webrtc/api, and a default implementation part, which lies in webrtc/modules.

This change makes it possible to create other mixer implementations and is a first step to facilitate passing down a mixer from outside of WebRTC.

It will also create less build dependencies when the new mixer has replaced the old one.

NOTRY=True
TBR=henrik.lundin@webrtc.org
BUG=webrtc:6346

Review-Url: https://codereview.webrtc.org/2411313003
Cr-Commit-Position: refs/heads/master@{#14705}
2016-10-20 12:06:44 +00:00
brandtr
76648da8dc Add FlexfecReceiveStream.
This class is logically parallel with the {Audio,Video}ReceiveStream
classes. Its purpose is to describe a receive stream of FlexFEC packets,
through the corresponding config.

Functionally, this class simply forwards the received RTP packets
to its FlexfecReceiver, which returns recovered packets to the
Call level, for appropriate demultiplexing based on SSRC.

BUG=webrtc:5654

Review-Url: https://codereview.webrtc.org/2397843005
Cr-Commit-Position: refs/heads/master@{#14704}
2016-10-20 11:54:51 +00:00
Magnus Jedvert
577bc19210 Android: Move YuvConverter to its own file
YuvConverter is complex class that deserves its own file. It is also used outside of SurfaceTextureHelper.

BUG=webrtc:6470
R=sakal@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14683}
2016-10-19 13:29:13 +00:00
sakal
73c5d4a083 Include ScreenCapturerAndroid in libjingle_peerconnection_java.jar
This makes it possible for external applications to use this class.

BUG=webrtc:6524
NOTRY=True

Review-Url: https://codereview.webrtc.org/2430693002
Cr-Commit-Position: refs/heads/master@{#14679}
2016-10-19 09:46:27 +00:00
mandermo
64e1a32e2f Second try to get "Support for video file instead of camera and output video out to file" accepted
The old CL can be found here: https://codereview.webrtc.org/2273573003/

The orginal broke down stream, this CL tries to solve those issues.

BUG=webrtc:6545

Review-Url: https://codereview.webrtc.org/2426003002
Cr-Commit-Position: refs/heads/master@{#14665}
2016-10-18 15:47:59 +00:00
kjellander
67a8c986ab Revert of Support for video file instead of camera and output video out to file (patchset #17 id:320001 of https://codereview.webrtc.org/2273573003/ )
Reason for revert:
Breaks internal project.

Original issue's description:
> Support for video file instead of camera and output video out to file
>
> When video out to file is enabled the remote video which is recorded is
> not show on screen.
>
> You can use this command line for file input and output:
> monkeyrunner ./webrtc/examples/androidapp/start_loopback_stubbed_camera_saved_video_out.py --devname 02157df28cd47001 --videoin /storage/emulated/0/reference_video_1280x720_30fps.y4m --videoout /storage/emulated/0/output.y4m --videoout_width 1280 --videoout_height 720 --videooutsave /tmp/out.y4m
>
> BUG=webrtc:6545
>
> Committed: https://crrev.com/44666997ca912705f8f96c9bd211e719525a3ccc
> Cr-Commit-Position: refs/heads/master@{#14660}

TBR=magjed@webrtc.org,sakal@webrtc.org,jansson@chromium.org,mandermo@google.com,mandermo@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6545

Review-Url: https://codereview.webrtc.org/2425763003
Cr-Commit-Position: refs/heads/master@{#14664}
2016-10-18 13:05:40 +00:00
mandermo
44666997ca Support for video file instead of camera and output video out to file
When video out to file is enabled the remote video which is recorded is
not show on screen.

You can use this command line for file input and output:
monkeyrunner ./webrtc/examples/androidapp/start_loopback_stubbed_camera_saved_video_out.py --devname 02157df28cd47001 --videoin /storage/emulated/0/reference_video_1280x720_30fps.y4m --videoout /storage/emulated/0/output.y4m --videoout_width 1280 --videoout_height 720 --videooutsave /tmp/out.y4m

BUG=webrtc:6545

Review-Url: https://codereview.webrtc.org/2273573003
Cr-Commit-Position: refs/heads/master@{#14660}
2016-10-18 11:52:06 +00:00
kjellander
e40a7ee007 GN: Exclude suppressions of Chromium Clang warnings for Chromium builds.
These suppressions are causing GN errors when Chromium targets are depending
directly on WebRTC targets (needed for https://codereview.chromium.org/2413103004)

BUG=webrtc:4256
NOTRY=True

Review-Url: https://codereview.webrtc.org/2408133008
Cr-Commit-Position: refs/heads/master@{#14644}
2016-10-17 06:56:20 +00:00
magjed
df494b0908 Android: Split out EGL rendering from SurfaceViewRenderer to separate class
The purpose is to prepare for a TextureViewRenderer that will share the
EGL rendering code.

Two functional changes are also included:
* The implementation of SurfaceHolder.Callback.surfaceDestroyed will now
  block until the EGL surface is released. This is done in order to
  comply with the documentation that says: "If you have a rendering
  thread that directly accesses the surface, you must ensure that thread
  is no longer touching the Surface before returning from this function."
* We will no longer try to hide render glitches during layout changes.
  This was a lost cause anyway.

BUG=webrtc:6407

Review-Url: https://codereview.webrtc.org/2399463006
Cr-Commit-Position: refs/heads/master@{#14570}
2016-10-07 12:32:43 +00:00
charujain
b7446d7101 GN: Fix incorrect include_dir for libjingle_peerconnection_jni target
BUG=webrtc:6412
NOTRY=True

Review-Url: https://codereview.webrtc.org/2376753003
Cr-Commit-Position: refs/heads/master@{#14410}
2016-09-28 07:47:59 +00:00
kjellander
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
sakal
3442579fd7 Session based capturing for Camera1Capturer.
BUG=webrtc:6148

Review-Url: https://codereview.webrtc.org/2187293002
Cr-Commit-Position: refs/heads/master@{#14318}
2016-09-21 08:35:01 +00:00
hbos
74e1a4f96a PeerConnection[Interface]::GetStats(RTCStatsCollectorCallback*) added.
New file structure and targets:

rtc_stats_api
  webrtc/api/stats/rtcstats.h
  webrtc/api/stats/rtcstats_objects.h
  webrtc/api/stats/rtcstatsreport.h

rtc_stats (dep on rtc_stats_api)
  webrtc/stats/rtcstats.cc
  webrtc/stats/rtcstats_objects.cc
  webrtc/stats/rtcstatsreport.cc

libjingle_peerconnection (dep on rtc_stats)
  webrtc/api/rtcstatscollector.cc
  webrtc/api/rtcstatscollector.h

Placing rtc_stats_api headers in this separate target instead of
libjingle_peerconnection avoids a circular dependency
libjingle_peerconnection -> rtc_stats -> libjingle_peerconnection

Code changes:

PeerConnectionInterface::GetStats(RTCStatsCollectorCallback*) added for
the new stats collection API. Implemented by PeerConnection.

BUG=chromium:627816

Review-Url: https://codereview.webrtc.org/2331373004
Cr-Commit-Position: refs/heads/master@{#14246}
2016-09-16 06:33:04 +00:00
kjellander
705ecc5dda GN: Change group deps to public_deps.
During GN vs GYP auditing it was discovered that some
GN targets that had public_configs were not exposing them
to dependents where the dependent depended on a group, which
in turn included that target as a dependency. Instead of
changing those public_configs to all_dependent_configs
(which would be a change from GYP), it's better to just change
those group targets to use public_deps instead.

BUG=webrtc:6323
NOTRY=True
TESTED=Generated GYP and GN project files on Mac and ran the
tools/gyp_flag_compare.py script before and after this patch was
applied. The file in question used for inspection was the
webrtc/api/webrtcsessiondescriptionfactory.cc
which is a part of the libjingle_peerconnection target.

Review-Url: https://codereview.webrtc.org/2344623002
Cr-Commit-Position: refs/heads/master@{#14222}
2016-09-15 07:53:34 +00:00
ehmaldonado
acf9f4785a GN Templates: Introduce rtc_shared_library
libjingle_peerconnection_so is not including common_config, which is
causing some differences is the defines.

We'd like to prevent that happening in the future.

NOTRY=True
BUG=webrtc:5949

Review-Url: https://codereview.webrtc.org/2325603002
Cr-Commit-Position: refs/heads/master@{#14127}
2016-09-08 11:26:42 +00:00
ehmaldonado
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
ehmaldonado
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
ehmaldonado
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
kjellander
a69d973267 Move webrtc/audio_*.h to webrtc/api/call
BUG=webrtc:5878
NOTRY=True

Review-Url: https://codereview.webrtc.org/2059703002
Cr-Commit-Position: refs/heads/master@{#13996}
2016-08-31 14:33:14 +00:00
sakal
9e4a3040ed Reland of move the old AndroidVideoCapturer stack code. (patchset #1 id:1 of https://codereview.webrtc.org/2291583002/ )
Reason for revert:
Downstream apps should now be fixed.

Original issue's description:
> Revert of Remove the old AndroidVideoCapturer stack code. (patchset #2 id:20001 of https://codereview.webrtc.org/2235893003/ )
>
> Reason for revert:
> Breaks downstream.
>
> Original issue's description:
> > Remove the old AndroidVideoCapturer stack code.
> >
> > This code is no longer needed. Apps should be using the new API introduced here: https://codereview.webrtc.org/2127893002/
> >
> > Committed: https://crrev.com/1b365a8db070f9cdcbf35ec871f758dcd909e51d
> > Cr-Commit-Position: refs/heads/master@{#13950}
>
> TBR=magjed@webrtc.org,glaznev@webrtc.org,kjellander@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://crrev.com/e39f251dacf66e50153bcda615f06b7c59e5856b
> Cr-Commit-Position: refs/heads/master@{#13958}

TBR=magjed@webrtc.org,glaznev@webrtc.org,kjellander@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.

Review-Url: https://codereview.webrtc.org/2298063003
Cr-Commit-Position: refs/heads/master@{#13988}
2016-08-31 09:53:54 +00:00
hbos
d565b73121 RTCStatsCollector and RTCPeerConnectionStats added.
This is the stats collector for the new stats types, RTCStats[1] and
RTCStatsReport[2]. It so far only produces RTCPeerConnectionStats[3] as
an example of how it would collect stats. Each RTCStats subclass will
get a corresponding RTCStatsCollector::ProduceFooStats().

Stats reports are cached and returned as const references (ref
counting). This allows stats to be inspected by multiple observers and
across multiple threads. No copies will have to be made when surfacing
this to Blink or other places.

The current implementation of ProducePeerConnectionStats() only look at
existing DataChannels. This might be incorret if data channels can be
removed? Will investigate in a follow-up, crbug.com/636818.

[1] https://www.w3.org/TR/2016/WD-webrtc-20160531/#idl-def-rtcstats
[2] https://www.w3.org/TR/2016/WD-webrtc-20160531/#rtcstatsreport-object
[3] https://w3c.github.io/webrtc-stats/archives/20160526/webrtc-stats.html#pcstats-dict*

BUG=chromium:627816, chromium:636818

Review-Url: https://codereview.webrtc.org/2242043002
Cr-Commit-Position: refs/heads/master@{#13979}
2016-08-30 21:04:40 +00:00
sakal
e39f251dac Revert of Remove the old AndroidVideoCapturer stack code. (patchset #2 id:20001 of https://codereview.webrtc.org/2235893003/ )
Reason for revert:
Breaks downstream.

Original issue's description:
> Remove the old AndroidVideoCapturer stack code.
>
> This code is no longer needed. Apps should be using the new API introduced here: https://codereview.webrtc.org/2127893002/
>
> Committed: https://crrev.com/1b365a8db070f9cdcbf35ec871f758dcd909e51d
> Cr-Commit-Position: refs/heads/master@{#13950}

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

Review-Url: https://codereview.webrtc.org/2291583002
Cr-Commit-Position: refs/heads/master@{#13958}
2016-08-29 14:31:31 +00:00
sakal
1b365a8db0 Remove the old AndroidVideoCapturer stack code.
This code is no longer needed. Apps should be using the new API introduced here: https://codereview.webrtc.org/2127893002/

Review-Url: https://codereview.webrtc.org/2235893003
Cr-Commit-Position: refs/heads/master@{#13950}
2016-08-29 09:20:26 +00:00
ehmaldonado
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
hbos
615d3013de RTCStats and RTCStatsReport added (webrtc/stats).
The old and new getStats are very different. This CL proposes rewriting
the new getStats from scratch with a bottom-up approach, starting with
the fundamental stats classes. This will allow cleaner and more
efficient code that is more aligned with the spec.

RTCStats and subclasses are the equivalent to RTCStats and RTCStats-
-derived dictionaries from the specs[1][2]. The dictionary members are
public member variables of type RTCStatsMember<T>, where T is one of the
supported types. All members derive from RTCStatsMemberInterface and
iteration of members is possible with RTCStats::Members().
The members are not stored in a map for performance and readability.
Type checking is supported with static class variables, kType.

Only the supported member types T are specialized and may be
instantiated, and sequences are supported with std::vector<...>. Type
checking is again supported with static class variables, kType.

RTCStatsReport is the equivalent from the spec[3], and maps RTCStats::id
to RTCStats-objects. RTCStatsReport is reference counted. It and its
contained stats may be destroyed on any thread. When the
RTCStatsCollector is added in a follow-up CL, it will return const
references to the RTCStatsReports. This means copies don't have to be
made for multiple stats observers or when jumping threads. In fact, no
copies of any stats will have to be made in surfacing stats to Blink.

[1] https://www.w3.org/TR/2016/WD-webrtc-20160531/#rtcstats-dictionary
[2] https://w3c.github.io/webrtc-stats/archives/20160526/webrtc-stats.html
[3] https://www.w3.org/TR/2016/WD-webrtc-20160531/#rtcstatsreport-object

This adds the new folder webrtc/stats/, with target rtc_stats and binary
rtc_stats_unittests. Public api headers are placed in webrtc/api/ and
.cc files are placed in webrtc/stats/.

BUG=chromium:627816

Review-Url: https://codereview.webrtc.org/2241093002
Cr-Commit-Position: refs/heads/master@{#13879}
2016-08-24 08:33:19 +00:00
sakal
a53fa0a25b Fix AppRTC Android Demo GN build when is_component_build=true.
BUG=webrtc:6174
NOTRY=True

Review-Url: https://codereview.webrtc.org/2270003002
Cr-Commit-Position: refs/heads/master@{#13876}
2016-08-24 07:48:30 +00:00
kjellander
b37c45cadc GN: Add libjingle_peerconnection_java to peerconnection_unittests.
This dependency was found missing since it's defined in
https://cs.chromium.org/chromium/src/third_party/webrtc/build/android_tests.gyp?rcl=0&l=129
which causes many of the tests to crash with org.webrtc.AudioTrack class
not being found.

BUG=webrtc:5949
TBR=ehmaldonado@webrtc.org
NOTRY=True
TESTED=Passing local run of peerconnection_unittests on Android.

Review-Url: https://codereview.webrtc.org/2268973003
Cr-Commit-Position: refs/heads/master@{#13867}
2016-08-23 19:55:49 +00:00
sakal
86ccd7bfba Revert of Add field_trial_default dependency to libjingle_peerconnection (patchset #3 id:40001 of https://codereview.webrtc.org/2120673004/ )
Reason for revert:
Breaks chromium.

Original issue's description:
> Add field_trial_default dependency to libjingle_peerconnection
>
> This is needed for webrtc::field_trial::FindFullName in peerconnection.cc
>
> NOTRY=True
>
> Committed: https://crrev.com/a7a01df2aebe7108afad208ccd0341c2f0bc7b3b
> Cr-Commit-Position: refs/heads/master@{#13836}

TBR=pthatcher@webrtc.org,pthatcher@chromium.org,kjellander@webrtc.org,arlolra@gmail.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.webrtc.org/2263063002
Cr-Commit-Position: refs/heads/master@{#13837}
2016-08-22 07:26:11 +00:00
arlolra
a7a01df2ae Add field_trial_default dependency to libjingle_peerconnection
This is needed for webrtc::field_trial::FindFullName in peerconnection.cc

NOTRY=True

Review-Url: https://codereview.webrtc.org/2120673004
Cr-Commit-Position: refs/heads/master@{#13836}
2016-08-22 06:48:14 +00:00
hbos
b24b1ceb48 Moving mock classes around so that they may be reused in other unittests
New files, classes moved from statscollector_unittest.cc:
+webrtc/api/test/mock_peerconnection.h
 for MockPeerConnectionFactory and MockPeerConnection
+webrtc/api/test/mock_webrtcsession.h
 for MockWebRtcSession
+webrtc/media/base/test/mock_mediachannel.h
 for MockVideoMediaChannel and MockVoiceMediaChannel

The webrtc/media/base/test folder is new.

BUG=chromium:627816

Review-Url: https://codereview.webrtc.org/2238933002
Cr-Commit-Position: refs/heads/master@{#13769}
2016-08-16 08:19:48 +00:00
sakal
714dd4e532 GN: Update tests to have the correct shard timeout value on Android.
TBR=mflodman@webrtc.org
NOTRY=True

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