408 Commits

Author SHA1 Message Date
henrika
92fd8e6b17 Removes usage of system_wrappers/include/clock.h in audio_device/
BUG=webrtc:6687
NOTRY=TRUE

Review-Url: https://codereview.webrtc.org/2501603002
Cr-Commit-Position: refs/heads/master@{#15084}
2016-11-15 13:38:02 +00:00
henrika
0b3a6389c0 Ensures that AudioDeviceBuffer::StopPeriodicLogging works as intended.
Minor fix to resolve https://bugs.chromium.org/p/webrtc/issues/detail?id=6560&desc=2#c5

BUG=webrtc:6560
NOTRY=TRUE

Review-Url: https://codereview.webrtc.org/2496543002
Cr-Commit-Position: refs/heads/master@{#15036}
2016-11-11 10:28:58 +00:00
aleloi
44c7ecf88e Added a public GN config to compile mock headers.
Due to bugs.webrtc.org/216 code that includes
//webrtc/modules/audio_device:mock_audio_device fails to compile on
Windows unless a warning flag is switched off. It seems that
googlemock changes types of overridden virtual method parameters from
'const int' to 'int', which causes the VS compiler to report an error.

The problem was not solved by suppressing the flag wd4373 in
//webrtc/modules/audio_device:mock_audio_device, because targets that
include the headers are compiled separately.

This CL adds the flag suppression to the GN variable
|all_dependent_configs|. Then GN will apply the configuration to all
reachable dependencies. This is needed to reduce clutter and extra
conditions in dependency build targets.

The reason for |all_dependent_configs| before |public_configs| is
for a situation in which a targets headers include the headers from
this target. Then dependencies of dependencies will have a copy of
this targets' code after preprocessing, and compilation will fail.
This will happen if we e.g. change mock_voice_engine to return a
MockAudioTransport or MockAudioDevice.

This change has been tested by compiling a dependent CL
(https://codereview.webrtc.org/2454373002/) which uses these mocks
on Windows without suppressing the flag.

There is no GYP change, because test code has been removed from GYP.

NOTRY=True
BUG=webrtc:216

Review-Url: https://codereview.webrtc.org/2492713003
Cr-Commit-Position: refs/heads/master@{#15024}
2016-11-10 16:16:30 +00:00
aleloi
5de52fd38e Created a mocked AudioTransport.
There are currently two nearly identical classes called
MockAudioTransport defined in two unit tests:
android/audio_transport_unittest.cc and
/ios/audio_transport_unittest_ios.cc

This change defines a common mocked AudioTransport. The two current
mocks are rewritten to use the common one. A GN target is created for
this mock and MockAudioDevice.

This change will allow to provide a mocked AudioTransport to
AudioState in a dependent CL https://codereview.webrtc.org/2454373002/

BUG=webrtc:6346
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2493483002
Cr-Commit-Position: refs/heads/master@{#15010}
2016-11-10 09:05:39 +00:00
henrika
51e9608f01 AudioDeviceBuffer now uses 16-bit buffers
BUG=webrtc:6560

Review-Url: https://codereview.webrtc.org/2482053003
Cr-Commit-Position: refs/heads/master@{#15008}
2016-11-10 08:40:44 +00:00
henrika
f502222443 - Adds thread safety annotations to the AudioDeviceBuffer class.
- Removes the lock that was used to protect the audio transport object.
  It is now protected "by design" instead.
- Removes rec/play_bytes_per_sample_ since we only support 16-bit samples.

BUG=webrtc:6560
R=kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14950}
2016-11-07 14:57:11 +00:00
henrika
ba156cfe96 Improvements in how WebRTC.Audio.RecordedOnlyZeros is added as histogram.
Contains fixes for a non-perfect implementation in https://codereview.webrtc.org/2328433003/

Summary:

Adds WebRTC.Audio.RecordedOnlyZeros UMA stat when recording stops if:
- All level estimates during the audio session were zero, and
- If the audio session was longer than 10 seconds.

Adds four simple methods to the AudioDeviceBuffer (ADB) class to allow the ADM
to update the ADB about when media starts and stops in both directions.

Moves any "critical" parst out frome the timer (based on task queue) and ensures
that it only does trivial logging tasks.

The task queue is now owned by a unique pointer to improve control of when it
starts and stops.

Adds time measurements (for logging) of both total time playing out and total
recording time. Units are in milliseconds.

BUG=webrtc:6592

Review-Url: https://codereview.webrtc.org/2445363003
Cr-Commit-Position: refs/heads/master@{#14854}
2016-10-31 15:18:54 +00:00
terelius
c4b9b9419e Revert of Replace FileWrapper with File (in audio_device) (patchset #3 id:40001 of https://codereview.webrtc.org/2386963003/ )
Reason for revert:
Speculative revert. This CL is a plausible cause for breakages in internal projects.

Original issue's description:
> Removes all uses of FileWrapper in audio_device.
>
> BUG=webrtc:6463
>
> Committed: https://crrev.com/04055e95bf97d106053d90bcc9e974eb4ad175e6
> Cr-Commit-Position: refs/heads/master@{#14811}

TBR=sprang@webrtc.org,henrika@webrtc.org,palmkvist@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6463

Review-Url: https://codereview.webrtc.org/2459873002
Cr-Commit-Position: refs/heads/master@{#14822}
2016-10-28 13:52:04 +00:00
palmkvist
04055e95bf Removes all uses of FileWrapper in audio_device.
BUG=webrtc:6463

Review-Url: https://codereview.webrtc.org/2386963003
Cr-Commit-Position: refs/heads/master@{#14811}
2016-10-28 09:08:29 +00:00
henrika
fe90b4176c Improves audio logs of native audio layers on Android
BUG=webrtc:6592,webrtc:6580

Review-Url: https://codereview.webrtc.org/2447683002
Cr-Commit-Position: refs/heads/master@{#14798}
2016-10-27 08:42:19 +00:00
henrika
3355f6d6f5 Avoids invalid copy of audio buffer to task queue.
Now does level estimate on the audio threads to avoid complex
copying of audio data to task queue. The old implementation could
also crash due to unclear ownership of the audio buffer.

BUG=webrtc:6569
R=kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14720}
2016-10-21 10:45:31 +00:00
henrika
5588a13fe7 Now uses rtc::Buffer in AudioDeviceBuffer.
The main goal of this CL is to remove old buffer handling using static arrays
and switch to the improved rtc::Buffer class instead.

By doing so, we can remove some members (since Buffer maintains them instead) and
do some additional cleanup.

This CL also fixes some minor style issues and improves the locking mechanism.

Finally, AudioDeviceBuffer::SetRecordingChannel() is deprecated since it has never been
used and is not included in any test.

BUG=NONE

Review-Url: https://codereview.webrtc.org/2333273002
Cr-Commit-Position: refs/heads/master@{#14661}
2016-10-18 12:14:35 +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
henrika
722b0dc108 Revert of Android audio playout now supports non-call media streams (patchset #3 id:10004 of https://codereview.webrtc.org/2411263003/ )
Reason for revert:
There is a risk of ending up in a bad state due to race conditions with this patch. Tests in downstream clients have shown that it can
happen that an output stream is opened up in MUSIC mode when it should not.

Reverting since the new functionality added here is not worth the
risk of breaking existing clients.

Original issue's description:
> Android audio playout now supports non-call media streams.
>
> The default (preferred) stream type for output audio is STREAM_VOICE_CALL since the WebRTC stack is mainly intended for VoIP calls. But if the user wants to run in another mode than COMM mode, we now accept it and change the stream type to STREAM_MUSIC instead. It can e.g. be suitable for applications that does not record audio or if a call shall be casted to a Chromecast device.
>
> The solution is somewhat experimental.
>
> NOTRY=TRUE
>
> BUG=webrtc:4767
>
> Committed: https://crrev.com/872f614111f436d15e29516ce19c3b63d25b8639
> Cr-Commit-Position: refs/heads/master@{#14613}

TBR=henrik.lundin@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:4767

Review-Url: https://codereview.webrtc.org/2420583002
Cr-Commit-Position: refs/heads/master@{#14626}
2016-10-13 08:12:37 +00:00
henrika
872f614111 Android audio playout now supports non-call media streams.
The default (preferred) stream type for output audio is STREAM_VOICE_CALL since the WebRTC stack is mainly intended for VoIP calls. But if the user wants to run in another mode than COMM mode, we now accept it and change the stream type to STREAM_MUSIC instead. It can e.g. be suitable for applications that does not record audio or if a call shall be casted to a Chromecast device.

The solution is somewhat experimental.

NOTRY=TRUE

BUG=webrtc:4767

Review-Url: https://codereview.webrtc.org/2411263003
Cr-Commit-Position: refs/heads/master@{#14613}
2016-10-12 15:11:48 +00:00
henrika
14acf658ad AudioTransport::NeedMorePlayData is no longer called from different threads using OpenSL ES on Android
BUG=webrtc:6476
NOTRY=TRUE

Review-Url: https://codereview.webrtc.org/2410033002
Cr-Commit-Position: refs/heads/master@{#14599}
2016-10-11 13:15:44 +00:00
henrika
defc21e0aa Removes usage of hardware AGC and any related APIs on Android.
Compromise solution where WebRtcAudioUtils.setWebRtcBasedAutomaticGainControl() is marked
as deprecated and where as many APIs as possible that touches the HW AGC are removed. Some basic architecture is saved to ensure that we can restore usage of
the HW AGC if ever required for future devices.

The AppRTCMobile demo does still contain an AGC check box but it is now grayed out.

BUG=b/30387905

Review-Url: https://codereview.webrtc.org/2402883003
Cr-Commit-Position: refs/heads/master@{#14596}
2016-10-11 08:29:16 +00:00
jianjun.zhu
a84aa57799 Use std::abs instead of C-style abs.
BUG=webrtc:6486

Review-Url: https://codereview.webrtc.org/2396823002
Cr-Commit-Position: refs/heads/master@{#14536}
2016-10-06 02:19:30 +00:00
tkchin
5fa51e2947 Add iOS static library GN build script.
NOTRY=True

BUG=webrtc:6372

Review-Url: https://codereview.webrtc.org/2391123002
Cr-Commit-Position: refs/heads/master@{#14532}
2016-10-05 20:16:07 +00:00
kwiberg
5377bc77cc Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere
The former is always defined (by webrtc/base/checks.h) to either 0 or
1, whereas the latter isn't necessarily defined.

This is a re-land of https://codereview.webrtc.org/2384693002, which
broke Chromium. We re-land without changing this CL at all, because
the thing that needed fixing was in Chromium:
https://codereview.chromium.org/2384263004.

NOTRY=true
TBR=ossu@webrtc.org
BUG=webrtc:6451

Review-Url: https://codereview.webrtc.org/2389943003
Cr-Commit-Position: refs/heads/master@{#14508}
2016-10-04 20:47:02 +00:00
ehmaldonado
ebb0b8ec9a Increase the threshold for RunPlayoutAndRecordingInFullDuplex.
RunPlayoutAndRecordingInFullDuplex fails sometimes on Android swarming
bots, presumably because the timing is hardware dependent.

This test ensures that audio starts pumping. The exact performance is
not that important.

R=kjellander@webrtc.org, henrika@webrtc.org
BUG=webrtc:6464
NOTRY=True

Review-Url: https://codereview.webrtc.org/2391563002
Cr-Commit-Position: refs/heads/master@{#14492}
2016-10-04 08:59:05 +00:00
guidou
8f9010631c Revert of Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere (patchset #2 id:20001 of https://codereview.webrtc.org/2384693002/ )
Reason for revert:
This CL breaks FYI bots with a compile error.

Sample error:
jingle/glue/thread_wrapper.cc -o obj/jingle/jingle_glue/thread_wrapper.o
In file included from ../../jingle/glue/thread_wrapper.cc:5:
In file included from ../../jingle/glue/thread_wrapper.h:16:
In file included from ../../base/message_loop/message_loop.h:17:
In file included from ../../base/memory/ref_counted.h:19:
../../base/logging.h:598:1: error: call to 'MakeCheckOpString' is ambiguous
DEFINE_CHECK_OP_IMPL(EQ, ==)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../base/logging.h:592:17: note: expanded from macro 'DEFINE_CHECK_OP_IMPL'
    else return MakeCheckOpString(v1, v2, names); \
                ^~~~~~~~~~~~~~~~~
../../jingle/glue/thread_wrapper.cc:46:3: note: in instantiation of function template specialization 'logging::CheckEQImpl<rtc::Thread *, jingle_glue::JingleThreadWrapper *>' requested here
  DCHECK_EQ(rtc::Thread::Current(), current());
  ^
../../base/logging.h:748:31: note: expanded from macro 'DCHECK_EQ'
#define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2)
                              ^
../../base/logging.h:721:18: note: expanded from macro 'DCHECK_OP'
      ::logging::Check##name##Impl((val1), (val2),                     \
                 ^
<scratch space>:102:1: note: expanded from here
CheckEQImpl
^
../../base/logging.h:555:14: note: candidate function [with t1 = rtc::Thread *, t2 = jingle_glue::JingleThreadWrapper *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
../../third_party/webrtc/base/checks.h:122:14: note: candidate function [with t1 = rtc::Thread *, t2 = jingle_glue::JingleThreadWrapper *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
In file included from ../../jingle/glue/thread_wrapper.cc:5:
In file included from ../../jingle/glue/thread_wrapper.h:16:
In file included from ../../base/message_loop/message_loop.h:17:
In file included from ../../base/memory/ref_counted.h:19:
../../base/logging.h:598:1: error: call to 'MakeCheckOpString' is ambiguous
DEFINE_CHECK_OP_IMPL(EQ, ==)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../base/logging.h:592:17: note: expanded from macro 'DEFINE_CHECK_OP_IMPL'
    else return MakeCheckOpString(v1, v2, names); \
                ^~~~~~~~~~~~~~~~~
../../jingle/glue/thread_wrapper.cc:81:3: note: in instantiation of function template specialization 'logging::CheckEQImpl<jingle_glue::JingleThreadWrapper *, jingle_glue::JingleThreadWrapper *>' requested here
  DCHECK_EQ(this, JingleThreadWrapper::current());
  ^
../../base/logging.h:748:31: note: expanded from macro 'DCHECK_EQ'
#define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2)
                              ^
../../base/logging.h:721:18: note: expanded from macro 'DCHECK_OP'
      ::logging::Check##name##Impl((val1), (val2),                     \
                 ^
<scratch space>:5:1: note: expanded from here
CheckEQImpl
^
../../base/logging.h:555:14: note: candidate function [with t1 = jingle_glue::JingleThreadWrapper *, t2 = jingle_glue::JingleThreadWrapper *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
../../third_party/webrtc/base/checks.h:122:14: note: candidate function [with t1 = jingle_glue::JingleThreadWrapper *, t2 = jingle_glue::JingleThreadWrapper *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
In file included from ../../jingle/glue/thread_wrapper.cc:5:
In file included from ../../jingle/glue/thread_wrapper.h:16:
In file included from ../../base/message_loop/message_loop.h:17:
In file included from ../../base/memory/ref_counted.h:19:
../../base/logging.h:598:1: error: call to 'MakeCheckOpString' is ambiguous
DEFINE_CHECK_OP_IMPL(EQ, ==)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../base/logging.h:592:17: note: expanded from macro 'DEFINE_CHECK_OP_IMPL'
    else return MakeCheckOpString(v1, v2, names); \
                ^~~~~~~~~~~~~~~~~
../../jingle/glue/thread_wrapper.cc:82:3: note: in instantiation of function template specialization 'logging::CheckEQImpl<jingle_glue::JingleThreadWrapper *, rtc::Thread *>' requested here
  DCHECK_EQ(this, rtc::Thread::Current());
  ^
../../base/logging.h:748:31: note: expanded from macro 'DCHECK_EQ'
#define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2)
                              ^
../../base/logging.h:721:18: note: expanded from macro 'DCHECK_OP'
      ::logging::Check##name##Impl((val1), (val2),                     \
                 ^
<scratch space>:12:1: note: expanded from here
CheckEQImpl
^
../../base/logging.h:555:14: note: candidate function [with t1 = jingle_glue::JingleThreadWrapper *, t2 = rtc::Thread *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
../../third_party/webrtc/base/checks.h:122:14: note: candidate function [with t1 = jingle_glue::JingleThreadWrapper *, t2 = rtc::Thread *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
3 errors generated.

Original issue's description:
> Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere
>
> The former is always defined (by webrtc/base/checks.h) to either 0 or
> 1, whereas the latter isn't necessarily defined.
>
> NOTRY=true
> BUG=webrtc:6451
>
> Committed: https://crrev.com/ab0b929321d37669165d5795268fa10a8c97ec5b
> Cr-Commit-Position: refs/heads/master@{#14474}

TBR=ossu@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:6451

Review-Url: https://codereview.webrtc.org/2384083004
Cr-Commit-Position: refs/heads/master@{#14480}
2016-10-03 15:32:36 +00:00
kwiberg
ab0b929321 Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere
The former is always defined (by webrtc/base/checks.h) to either 0 or
1, whereas the latter isn't necessarily defined.

NOTRY=true
BUG=webrtc:6451

Review-Url: https://codereview.webrtc.org/2384693002
Cr-Commit-Position: refs/heads/master@{#14474}
2016-10-03 12:04:25 +00:00
kwiberg
ac9f876bc0 Sort #includes that got unsorted when gmock.h and gtest.h moved to webrtc/test/
gmock.h and gtest.h were moved (or rather, got wrappers so that we
could put some icky compatibility hacks in one place instead of 500)
in this CL: https://codereview.webrtc.org/2358993004/

NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2381013002
Cr-Commit-Position: refs/heads/master@{#14464}
2016-10-01 05:29:53 +00:00
sakal
70736e4c9d Remove old presumably unused directory.
BUG=None

Review-Url: https://codereview.webrtc.org/2378103002
Cr-Commit-Position: refs/heads/master@{#14437}
2016-09-29 12:38:06 +00:00
sakal
b6760f9e44 Format all Java in WebRTC.
BUG=webrtc:6419
TBR=henrika@webrtc.org

Review-Url: https://codereview.webrtc.org/2377003002
Cr-Commit-Position: refs/heads/master@{#14432}
2016-09-29 11:12:51 +00:00
kwiberg
77eab70470 Enable the -Wundef warning for clang
NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2358993004
Cr-Commit-Position: refs/heads/master@{#14425}
2016-09-29 00:42:08 +00:00
henrika
f1363fdf57 Adds support for AVAudioSessionSilenceSecondaryAudioHintNotification on iOS
BUG=b/30944297
NOTRY=TRUE

Review-Url: https://codereview.webrtc.org/2366753005
Cr-Commit-Position: refs/heads/master@{#14398}
2016-09-27 13:06:48 +00:00
henrika
0a52c7003d THis CL enables possibility to select full-duplex OpenSL ES audio in AppRTCDemo, i.e., it adds support for OpenSL ES for input as well. The user must explicitly select this new mode in the debug UI hence it is not the default selection. There is no separate UI for input and output; instead both are enabled/disabled by the same switch.
BUG=webrtc:5925
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14390}
2016-09-27 07:35:37 +00:00
henrika
dda366611e Fixes minor issue in AudioDeviceTest.RunPlayoutAndRecordingInFullDuplex for iOS.
Followup on https://codereview.webrtc.org/2349263004/

BUG=NONE
NOTRY=TRUE

Review-Url: https://codereview.webrtc.org/2362263002
Cr-Commit-Position: refs/heads/master@{#14374}
2016-09-23 15:42:49 +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
henrika
051d151569 Adds audio session status to logs for each valid audio route change on iOS
BUG=b/30944297
NOTRY=TRUE

Review-Url: https://codereview.webrtc.org/2355393005
Cr-Commit-Position: refs/heads/master@{#14355}
2016-09-22 15:48:10 +00:00
henrika
c5aea65b76 Adds output audio volume to iOS logs
BUG=b/30944297
NOTRY=TRUE

Review-Url: https://codereview.webrtc.org/2360583002
Cr-Commit-Position: refs/heads/master@{#14334}
2016-09-21 14:46:01 +00:00
henrika
17802ae258 Ensures that ADM for Android and iOS uses identical states when stopping audio
BUG=b/25975010
TBR=tkchin
NOTRY=TRUE

Review-Url: https://codereview.webrtc.org/2349263004
Cr-Commit-Position: refs/heads/master@{#14328}
2016-09-21 11:55:10 +00:00
henrika
a6d26ec6a2 Improves resolution when logging rate in the ADB class.
Trivial patch which fixes an issue where logged rate estimates could be
invalid. E.g. on iOS, two successive timer interrupts can be ~10.5 seconds
and not exactly 10.0 (which is usually the case on Android). In those
cases we could log a rate estimate of e.g. ~51000Hz instead of ~48000Hz.

This CL fixes that.

BUG=NONE

Review-Url: https://codereview.webrtc.org/2350103002
Cr-Commit-Position: refs/heads/master@{#14305}
2016-09-20 11:44:12 +00:00
henrika
918b554789 Adds support for OpenSL ES based audio capture on Android.
NOTE: the new code is disabled by default in the WebRtcAudioManager to ensure that
OpenSL ES is not accidentally activated in existing clients. There are still some
unresolved issues to sort out before it can be utilized.

Enables possibility to use OpenSL ES based audio in both directions for WebRTC.
All unit tests and demo clients have been tested with the new implementation but
the new support is behind a flag (see above).

More testing is needed before it can be used in the field and additional support for
hardware effects is still missing.

BUG=webrtc:5925
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14290}
2016-09-19 13:44:22 +00:00
maxmorin
ec62374ccd Reland of Add arraysize to rtc_base_approved. Remove dependency of audio_device on rtc_base. (patchset #1 id:1 of https://codereview.webrtc.org/2340253003/ )
Reason for revert:
Fix: let audio_device depend on rtc_base on IOS.

Original issue's description:
> Revert of Add arraysize to rtc_base_approved. Remove dependency of audio_device on rtc_base. (patchset #1 id:1 of https://codereview.webrtc.org/2346763002/ )
>
> Reason for revert:
> Breaks iOS
>
> Original issue's description:
> > Add arraysize to rtc_base_approved. Remove dependency of audio_device on rtc_base.
> >
> > BUG=webrtc:3806
> > NOTRY=True
> >
> > Committed: https://crrev.com/100c9d02669910bce06099b3cc1eaad60fd661dd
> > Cr-Commit-Position: refs/heads/master@{#14223}
>
> TBR=kjellander@webrtc.org,henrika@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:3806
>
> Committed: https://crrev.com/89fb9201b70616a1c33e277f38bf9367112536e8
> Cr-Commit-Position: refs/heads/master@{#14224}

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

Review-Url: https://codereview.webrtc.org/2340233003
Cr-Commit-Position: refs/heads/master@{#14233}
2016-09-15 12:11:59 +00:00
kjellander
17f008bf33 GYP: Remove targets inside include_tests==1 that are converted to GN.
Remove a large number of targets that are no longer built, to reduce maintenance.
Only targets that have a GN version were removed.

BUG=webrtc:6323
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2340773003
Cr-Commit-Position: refs/heads/master@{#14231}
2016-09-15 11:57:39 +00:00
maxmorin
89fb9201b7 Revert of Add arraysize to rtc_base_approved. Remove dependency of audio_device on rtc_base. (patchset #1 id:1 of https://codereview.webrtc.org/2346763002/ )
Reason for revert:
Breaks iOS

Original issue's description:
> Add arraysize to rtc_base_approved. Remove dependency of audio_device on rtc_base.
>
> BUG=webrtc:3806
> NOTRY=True
>
> Committed: https://crrev.com/100c9d02669910bce06099b3cc1eaad60fd661dd
> Cr-Commit-Position: refs/heads/master@{#14223}

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

Review-Url: https://codereview.webrtc.org/2340253003
Cr-Commit-Position: refs/heads/master@{#14224}
2016-09-15 08:45:33 +00:00
maxmorin
100c9d0266 Add arraysize to rtc_base_approved. Remove dependency of audio_device on rtc_base.
BUG=webrtc:3806
NOTRY=True

Review-Url: https://codereview.webrtc.org/2346763002
Cr-Commit-Position: refs/heads/master@{#14223}
2016-09-15 08:40:42 +00:00
maxmorin
f8a4ecc4a1 Remove dependency of audio_device on metrics_default.
BUG=webrtc:6349
NOTRY=True

Review-Url: https://codereview.webrtc.org/2338813002
Cr-Commit-Position: refs/heads/master@{#14205}
2016-09-14 07:20:26 +00:00
asapersson
1d02d3e5e6 Remove RTC_LOGGED_* macro.
BUG=

Review-Url: https://codereview.webrtc.org/2326843003
Cr-Commit-Position: refs/heads/master@{#14174}
2016-09-10 05:40:34 +00:00
Henrik Kjellander
a41c13e6a2 OWNERS: Make everyone able to change *.gn,*.gni files.
Project-wide change to make it possible for all team members
to do changes to GN files.

NOTRY=True
R=kwiberg@webrtc.org
TBR=henrika@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14163}
2016-09-09 12:51:48 +00:00
henrika
f06f35a161 Adds logging of native audio levels and UMA stats to track issues.
This changes added a simple measurement of levels "close to the audio hardware"
both for playout and for recording. These levels are logged once each 10 seconds.

It also adds WebRTC.Audio.RecordedOnlyZeros UMA stat and it is updated at
destuction. It will report true iff all reported recording leves are zero.

BUG=NONE
R=peah@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14160}
2016-09-09 12:23:24 +00:00
henrika
073378e79a Avoids crash at device switch on iOS by ensuring that audio parameters can be updated on the fly driven by e.g. switching audio device.
R=henrikg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14158}
2016-09-09 11:15:49 +00:00
henrika
0f8ea0da53 Avoids crash in WebRtcAudioTrack.initPlayout (part II)
I had reversed a condition in https://codereview.webrtc.org/2315363004/ and we always failed. Fixing that here.

TBR=magjed

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

Cr-Commit-Position: refs/heads/master@{#14136}
2016-09-08 14:11:47 +00:00
henrika
2c993ce505 Avoids crash in WebRtcAudioTrack.initPlayout
BUG=NONE
R=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14129}
2016-09-08 11:36:41 +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
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