408 Commits

Author SHA1 Message Date
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
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
henrika
6bf62f7ac5 Avoids java.lang.NullPointerException in WebRtcAudioRecord
BUG=NONE

Review-Url: https://codereview.webrtc.org/2276973003
Cr-Commit-Position: refs/heads/master@{#13922}
2016-08-25 12:16:34 +00:00
ehmaldonado
4bc4d2747b GN: Fix Windows Clang errors
BUG=webrtc:6255
NOTRY=True

Review-Url: https://codereview.webrtc.org/2274713005
Cr-Commit-Position: refs/heads/master@{#13919}
2016-08-25 11:15:46 +00:00
maxmorin
2ec45b9ffa Make dependency of audio_device of ApplicationServices explicit.
Tested in https://codereview.webrtc.org/2276903002.

BUG=webrtc:6170
NOTRY=true

Review-Url: https://codereview.webrtc.org/2273713003
Cr-Commit-Position: refs/heads/master@{#13895}
2016-08-24 13:51:11 +00:00
henrika
49810511c9 [Reland] Cleanup of the AudioDeviceBuffer class.
See https://codereview.webrtc.org/2256833003/

Contains a minor change to ensure that an external client builds.

TBR=magjed
BUG=NONE

Review-Url: https://codereview.webrtc.org/2269553004
Cr-Commit-Position: refs/heads/master@{#13845}
2016-08-22 12:56:17 +00:00
henrika
d7a89dbe8b Revert of Cleanup of the AudioDeviceBuffer class (patchset #6 id:100001 of https://codereview.webrtc.org/2256833003/ )
Reason for revert:
Seems to break an external client.

Original issue's description:
> Cleanup of the AudioDeviceBuffer class.
>
> WebRTC works on 10ms buffer sizes in both directions but this class has contained
> support for any size (with some limits) and for changes on the fly. It makes no sense to maintain such code and we have no tests to test it. This CL ensures that only 10ms audio buffers are supported and that nothing can be changed on the fly.
>
> It also updates the style to follow the Google C++ style guide.
>
> Finally, I remove very old (not tested and not maintained) support for file
> handling since the code is never used. It was more or less dead code.
>
> BUG=NONE
> R=magjed@webrtc.org
>
> Committed: https://crrev.com/cf327b45b9f5738950d4fca2b6a7b6030d508cdf
> Cr-Commit-Position: refs/heads/master@{#13833}

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

Review-Url: https://codereview.webrtc.org/2260183002
Cr-Commit-Position: refs/heads/master@{#13834}
2016-08-19 15:09:29 +00:00
henrika
cf327b45b9 Cleanup of the AudioDeviceBuffer class.
WebRTC works on 10ms buffer sizes in both directions but this class has contained
support for any size (with some limits) and for changes on the fly. It makes no sense to maintain such code and we have no tests to test it. This CL ensures that only 10ms audio buffers are supported and that nothing can be changed on the fly.

It also updates the style to follow the Google C++ style guide.

Finally, I remove very old (not tested and not maintained) support for file
handling since the code is never used. It was more or less dead code.

BUG=NONE
R=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13833}
2016-08-19 14:38:07 +00:00
ehmaldonado
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
maxmorin
3a11933a63 Remove audio_device_test_func.
This code does not work and hasn't been used in a long time. It also
lacks a GN target. There's no reason to save it.

BUG=none

Review-Url: https://codereview.webrtc.org/2255173002
Cr-Commit-Position: refs/heads/master@{#13820}
2016-08-18 14:20:48 +00:00
magjed
235020dba6 Roll chromium_revision 915e47250f..e3860bd297 (412201:412289)
Change log: 915e47250f..e3860bd297
Full diff: 915e47250f..e3860bd297

No dependencies changed.
No update to Clang.

NOTRY=TRUE
TBR=
BUG=webrtc:6219

Review-Url: https://codereview.webrtc.org/2253973002
Cr-Commit-Position: refs/heads/master@{#13809}
2016-08-18 08:45:53 +00:00
noahric
6a35590d14 Add code for dummy file audio to fallback to dummy audio.
BUG=

Review-Url: https://codereview.webrtc.org/2250853002
Cr-Commit-Position: refs/heads/master@{#13804}
2016-08-17 22:19:55 +00:00
noahric
d8a72f0ab2 Close input file in FileAudioDevice::StopRecording.
Also added some more logging, to help track down start/stop, start
failure, and the name of the file used.

BUG=

Review-Url: https://codereview.webrtc.org/2253763002
Cr-Commit-Position: refs/heads/master@{#13802}
2016-08-17 22:14:57 +00:00
henrika
4a42900540 Removes redundant log warning in WebRtcAudioManager.
Trivial patch which avoids logs that are of no value.

BUG=NONE

Review-Url: https://codereview.webrtc.org/2250403002
Cr-Commit-Position: refs/heads/master@{#13799}
2016-08-17 15:43:59 +00:00
noahric
c594aa61bc Add a gyp/gn option to use dummy audio file devices.
Conceptually, dummy audio file devices are a "platform", like
win/mac/linux, and so the conditional slots under
include_internal_audio_device. When enabled, use_dummy_audio_file_devices
disables whatever platform-specific audio layer would have been used and
turns on dummy file device support.

BUG=

Review-Url: https://codereview.webrtc.org/2250483002
Cr-Commit-Position: refs/heads/master@{#13790}
2016-08-17 01:21:23 +00:00
maxmorin
6910537458 Add gn target for audio_device_tests.
Note (for myself) that this depends on https://codereview.webrtc.org/2219653004/ and https://codereview.webrtc.org/2214003002/, it should not be landed before them.

NOTRY=True
BUG=webrtc:6170,webrtc:5949

Review-Url: https://codereview.webrtc.org/2216423002
Cr-Commit-Position: refs/heads/master@{#13773}
2016-08-16 09:17:48 +00:00
maxmorin
88e31a3fd8 Fix warnings, simplify ADM.
This is in preparation for adding a gn target for audio_device_tests.

BUG=webrtc:6170,webrtc:163
NOTRY=True

Review-Url: https://codereview.webrtc.org/2222563002
Cr-Commit-Position: refs/heads/master@{#13768}
2016-08-16 07:56:14 +00:00
noahric
3473288296 Remove VERBOSE logs in (android) audio device code.
When playing out, for example, you'd see 3 lines for every call to
PlayoutDelay, which happens quite often (every sample?).

The ones around the Playout/Recording Warning/Error are only once a
second, but they don't seem to add anything. Same with
Process/TimeUntilNextProcess, which just log that the method is called.

BUG=

Review-Url: https://codereview.webrtc.org/2202243004
Cr-Commit-Position: refs/heads/master@{#13763}
2016-08-15 20:41:28 +00:00
maxmorin
1aee0b5bd9 Remove old methods in AudioTransport, make it pass a gn build
when building with default warnings.

This is in preparation for making a gn target for audio_device_tests.

BUG=webrtc:6170, webrtc:163
NOTRY=True

Review-Url: https://codereview.webrtc.org/2219653004
Cr-Commit-Position: refs/heads/master@{#13759}
2016-08-15 18:46:28 +00:00
Sami Kalliomaki
d3235f0cd9 Re-order and remove unused Java imports.
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13608}
2016-08-02 13:44:19 +00:00
tkchin
cd2553937e Increase audio buffer duration for iPhone 4s.
NOTRY=True
BUG=

Review-Url: https://codereview.webrtc.org/2193573002
Cr-Commit-Position: refs/heads/master@{#13579}
2016-07-29 17:53:45 +00:00
henrika
3d7346fd46 Adds delta-time logging for audio playout
BUG=NONE
R=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13576}
2016-07-29 14:21:41 +00:00
henrika
c62ff86023 Adds periodic volume-level logging for Android.
The goal of this change is to log the volume level for the
current audio stream so we can keep track of what volume the
user selects during a call.

BUG=b/30376577
R=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13555}
2016-07-28 13:46:32 +00:00
tkchin
93dd634561 Treat foreground event as interruption end.
NOTRY=True
BUG=

Review-Url: https://codereview.webrtc.org/2181163005
Cr-Commit-Position: refs/heads/master@{#13543}
2016-07-27 17:17:19 +00:00
maxmorin
8c695b49e5 Remove redundant UMA stat reporting. Remove logs that are noisy on Windows.
BUG=webrtc:6109, webrtc:5761

Review-Url: https://codereview.webrtc.org/2169903002
Cr-Commit-Position: refs/heads/master@{#13520}
2016-07-25 09:46:52 +00:00
noahric
28fdf5637f Implement RecordingIsInitialized in file_audio_device.cc.
After https://codereview.webrtc.org/1827263002, audio devices are no
longer (ever) initialized if they return true from
RecordingIsInitialized. Since this was left as "return true;" for
file_audio_device, the recording buffer was never set up correctly, and
the audio buffer would assert when called (in debug) and FileAudioDevice
would cause memory corruption (in release).

BUG=

Review-Url: https://codereview.webrtc.org/2116003003
Cr-Commit-Position: refs/heads/master@{#13489}
2016-07-15 17:04:03 +00:00
henrika
6c4d0f0bbf Reland of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2148623004/ )
Reason for revert:
New fixes in libevent indicates that we are OK and can reland again.

Original issue's description:
> Revert of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2146853003/ )
>
> Reason for revert:
> Looks like things are still breaking upstream... :(
>
> Original issue's description:
> > Reland of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2141413002/ )
> >
> > Reason for revert:
> > Will make one more try since we have now confirmed that our TaskQueue tests works on Android. Let's hope for the best...
> >
> > Original issue's description:
> > > Revert of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2138403003/ )
> > >
> > > Reason for revert:
> > > Reverting again since it might have caused this issue:
> > >
> > > https://build.chromium.org/p/chromium.webrtc.fyi/builders/Android%20Tests%20%28dbg%29%20%28L%20Nexus9%29/builds/13622/steps/content_browsertests/logs/stdio
> > >
> > > Original issue's description:
> > > > Reland of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2139233002/ )
> > > >
> > > > Reason for revert:
> > > > My original patch broke things that are now fixed by https://codereview.webrtc.org/2141193002/.
> > > >
> > > > Hence I am relanding my original change.
> > > >
> > > > Original issue's description:
> > > > > Revert of Adds data logging in native AudioDeviceBuffer class (patchset #10 id:180001 of https://codereview.webrtc.org/2132613002/ )
> > > > >
> > > > > Reason for revert:
> > > > > Seems to break things upstream.
> > > > >
> > > > > Original issue's description:
> > > > > > Adds data logging in native AudioDeviceBuffer class.
> > > > > >
> > > > > > Goal is to provide periodic logging of most essential audio parameters
> > > > > > for playout and recording sides. It will allow us to track if the native audio layer is working as intended.
> > > > > >
> > > > > > BUG=NONE
> > > > > >
> > > > > > Committed: https://crrev.com/348e411dd27e6dbe9b84b27ce46e9b7c657c1eae
> > > > > > Cr-Commit-Position: refs/heads/master@{#13440}
> > > > >
> > > > > TBR=stefan@webrtc.org,henrika@webrtc.org
> > > > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > > > NOPRESUBMIT=true
> > > > > NOTREECHECKS=true
> > > > > NOTRY=true
> > > > > BUG=NONE
> > > > >
> > > > > Committed: https://crrev.com/025aa94ccb85e4c6fe20a3fecdac5d27ec9ba3da
> > > > > Cr-Commit-Position: refs/heads/master@{#13441}
> > > >
> > > > TBR=stefan@webrtc.org,sprang@webrtc.org
> > > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > > NOPRESUBMIT=true
> > > > NOTREECHECKS=true
> > > > NOTRY=true
> > > > BUG=NONE
> > > >
> > > > Committed: https://crrev.com/dd2fdecc78c50377d10ec98b41179acde9218ee7
> > > > Cr-Commit-Position: refs/heads/master@{#13455}
> > >
> > > TBR=stefan@webrtc.org,sprang@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=NONE
> > >
> > > Committed: https://crrev.com/5dd941e5a5ccde541d9b40a1df379ed59c5fab5c
> > > Cr-Commit-Position: refs/heads/master@{#13457}
> >
> > TBR=stefan@webrtc.org,sprang@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=NONE
> >
> > Committed: https://crrev.com/b201da3fab5efc048a4341f39293d2dcf27b2eec
> > Cr-Commit-Position: refs/heads/master@{#13462}
>
> TBR=stefan@webrtc.org,henrika@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=NONE
>
> Committed: https://crrev.com/ac09501381575dcb07560effc45ec7263d3ff3ad
> Cr-Commit-Position: refs/heads/master@{#13464}

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

Review-Url: https://codereview.webrtc.org/2148243002
Cr-Commit-Position: refs/heads/master@{#13476}
2016-07-14 12:54:24 +00:00
sprang
ac09501381 Revert of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2146853003/ )
Reason for revert:
Looks like things are still breaking upstream... :(

Original issue's description:
> Reland of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2141413002/ )
>
> Reason for revert:
> Will make one more try since we have now confirmed that our TaskQueue tests works on Android. Let's hope for the best...
>
> Original issue's description:
> > Revert of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2138403003/ )
> >
> > Reason for revert:
> > Reverting again since it might have caused this issue:
> >
> > https://build.chromium.org/p/chromium.webrtc.fyi/builders/Android%20Tests%20%28dbg%29%20%28L%20Nexus9%29/builds/13622/steps/content_browsertests/logs/stdio
> >
> > Original issue's description:
> > > Reland of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2139233002/ )
> > >
> > > Reason for revert:
> > > My original patch broke things that are now fixed by https://codereview.webrtc.org/2141193002/.
> > >
> > > Hence I am relanding my original change.
> > >
> > > Original issue's description:
> > > > Revert of Adds data logging in native AudioDeviceBuffer class (patchset #10 id:180001 of https://codereview.webrtc.org/2132613002/ )
> > > >
> > > > Reason for revert:
> > > > Seems to break things upstream.
> > > >
> > > > Original issue's description:
> > > > > Adds data logging in native AudioDeviceBuffer class.
> > > > >
> > > > > Goal is to provide periodic logging of most essential audio parameters
> > > > > for playout and recording sides. It will allow us to track if the native audio layer is working as intended.
> > > > >
> > > > > BUG=NONE
> > > > >
> > > > > Committed: https://crrev.com/348e411dd27e6dbe9b84b27ce46e9b7c657c1eae
> > > > > Cr-Commit-Position: refs/heads/master@{#13440}
> > > >
> > > > TBR=stefan@webrtc.org,henrika@webrtc.org
> > > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > > NOPRESUBMIT=true
> > > > NOTREECHECKS=true
> > > > NOTRY=true
> > > > BUG=NONE
> > > >
> > > > Committed: https://crrev.com/025aa94ccb85e4c6fe20a3fecdac5d27ec9ba3da
> > > > Cr-Commit-Position: refs/heads/master@{#13441}
> > >
> > > TBR=stefan@webrtc.org,sprang@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=NONE
> > >
> > > Committed: https://crrev.com/dd2fdecc78c50377d10ec98b41179acde9218ee7
> > > Cr-Commit-Position: refs/heads/master@{#13455}
> >
> > TBR=stefan@webrtc.org,sprang@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=NONE
> >
> > Committed: https://crrev.com/5dd941e5a5ccde541d9b40a1df379ed59c5fab5c
> > Cr-Commit-Position: refs/heads/master@{#13457}
>
> TBR=stefan@webrtc.org,sprang@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=NONE
>
> Committed: https://crrev.com/b201da3fab5efc048a4341f39293d2dcf27b2eec
> Cr-Commit-Position: refs/heads/master@{#13462}

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

Review-Url: https://codereview.webrtc.org/2148623004
Cr-Commit-Position: refs/heads/master@{#13464}
2016-07-13 14:55:52 +00:00
henrika
b201da3fab Reland of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2141413002/ )
Reason for revert:
Will make one more try since we have now confirmed that our TaskQueue tests works on Android. Let's hope for the best...

Original issue's description:
> Revert of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2138403003/ )
>
> Reason for revert:
> Reverting again since it might have caused this issue:
>
> https://build.chromium.org/p/chromium.webrtc.fyi/builders/Android%20Tests%20%28dbg%29%20%28L%20Nexus9%29/builds/13622/steps/content_browsertests/logs/stdio
>
> Original issue's description:
> > Reland of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2139233002/ )
> >
> > Reason for revert:
> > My original patch broke things that are now fixed by https://codereview.webrtc.org/2141193002/.
> >
> > Hence I am relanding my original change.
> >
> > Original issue's description:
> > > Revert of Adds data logging in native AudioDeviceBuffer class (patchset #10 id:180001 of https://codereview.webrtc.org/2132613002/ )
> > >
> > > Reason for revert:
> > > Seems to break things upstream.
> > >
> > > Original issue's description:
> > > > Adds data logging in native AudioDeviceBuffer class.
> > > >
> > > > Goal is to provide periodic logging of most essential audio parameters
> > > > for playout and recording sides. It will allow us to track if the native audio layer is working as intended.
> > > >
> > > > BUG=NONE
> > > >
> > > > Committed: https://crrev.com/348e411dd27e6dbe9b84b27ce46e9b7c657c1eae
> > > > Cr-Commit-Position: refs/heads/master@{#13440}
> > >
> > > TBR=stefan@webrtc.org,henrika@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=NONE
> > >
> > > Committed: https://crrev.com/025aa94ccb85e4c6fe20a3fecdac5d27ec9ba3da
> > > Cr-Commit-Position: refs/heads/master@{#13441}
> >
> > TBR=stefan@webrtc.org,sprang@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=NONE
> >
> > Committed: https://crrev.com/dd2fdecc78c50377d10ec98b41179acde9218ee7
> > Cr-Commit-Position: refs/heads/master@{#13455}
>
> TBR=stefan@webrtc.org,sprang@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=NONE
>
> Committed: https://crrev.com/5dd941e5a5ccde541d9b40a1df379ed59c5fab5c
> Cr-Commit-Position: refs/heads/master@{#13457}

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

Review-Url: https://codereview.webrtc.org/2146853003
Cr-Commit-Position: refs/heads/master@{#13462}
2016-07-13 13:40:25 +00:00
henrika
5dd941e5a5 Revert of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2138403003/ )
Reason for revert:
Reverting again since it might have caused this issue:

https://build.chromium.org/p/chromium.webrtc.fyi/builders/Android%20Tests%20%28dbg%29%20%28L%20Nexus9%29/builds/13622/steps/content_browsertests/logs/stdio

Original issue's description:
> Reland of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2139233002/ )
>
> Reason for revert:
> My original patch broke things that are now fixed by https://codereview.webrtc.org/2141193002/.
>
> Hence I am relanding my original change.
>
> Original issue's description:
> > Revert of Adds data logging in native AudioDeviceBuffer class (patchset #10 id:180001 of https://codereview.webrtc.org/2132613002/ )
> >
> > Reason for revert:
> > Seems to break things upstream.
> >
> > Original issue's description:
> > > Adds data logging in native AudioDeviceBuffer class.
> > >
> > > Goal is to provide periodic logging of most essential audio parameters
> > > for playout and recording sides. It will allow us to track if the native audio layer is working as intended.
> > >
> > > BUG=NONE
> > >
> > > Committed: https://crrev.com/348e411dd27e6dbe9b84b27ce46e9b7c657c1eae
> > > Cr-Commit-Position: refs/heads/master@{#13440}
> >
> > TBR=stefan@webrtc.org,henrika@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=NONE
> >
> > Committed: https://crrev.com/025aa94ccb85e4c6fe20a3fecdac5d27ec9ba3da
> > Cr-Commit-Position: refs/heads/master@{#13441}
>
> TBR=stefan@webrtc.org,sprang@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=NONE
>
> Committed: https://crrev.com/dd2fdecc78c50377d10ec98b41179acde9218ee7
> Cr-Commit-Position: refs/heads/master@{#13455}

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

Review-Url: https://codereview.webrtc.org/2141413002
Cr-Commit-Position: refs/heads/master@{#13457}
2016-07-13 09:32:45 +00:00
henrika
dd2fdecc78 Reland of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2139233002/ )
Reason for revert:
My original patch broke things that are now fixed by https://codereview.webrtc.org/2141193002/.

Hence I am relanding my original change.

Original issue's description:
> Revert of Adds data logging in native AudioDeviceBuffer class (patchset #10 id:180001 of https://codereview.webrtc.org/2132613002/ )
>
> Reason for revert:
> Seems to break things upstream.
>
> Original issue's description:
> > Adds data logging in native AudioDeviceBuffer class.
> >
> > Goal is to provide periodic logging of most essential audio parameters
> > for playout and recording sides. It will allow us to track if the native audio layer is working as intended.
> >
> > BUG=NONE
> >
> > Committed: https://crrev.com/348e411dd27e6dbe9b84b27ce46e9b7c657c1eae
> > Cr-Commit-Position: refs/heads/master@{#13440}
>
> TBR=stefan@webrtc.org,henrika@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=NONE
>
> Committed: https://crrev.com/025aa94ccb85e4c6fe20a3fecdac5d27ec9ba3da
> Cr-Commit-Position: refs/heads/master@{#13441}

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

Review-Url: https://codereview.webrtc.org/2138403003
Cr-Commit-Position: refs/heads/master@{#13455}
2016-07-13 08:49:02 +00:00
sprang
025aa94ccb Revert of Adds data logging in native AudioDeviceBuffer class (patchset #10 id:180001 of https://codereview.webrtc.org/2132613002/ )
Reason for revert:
Seems to break things upstream.

Original issue's description:
> Adds data logging in native AudioDeviceBuffer class.
>
> Goal is to provide periodic logging of most essential audio parameters
> for playout and recording sides. It will allow us to track if the native audio layer is working as intended.
>
> BUG=NONE
>
> Committed: https://crrev.com/348e411dd27e6dbe9b84b27ce46e9b7c657c1eae
> Cr-Commit-Position: refs/heads/master@{#13440}

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

Review-Url: https://codereview.webrtc.org/2139233002
Cr-Commit-Position: refs/heads/master@{#13441}
2016-07-12 10:08:51 +00:00
henrika
348e411dd2 Adds data logging in native AudioDeviceBuffer class.
Goal is to provide periodic logging of most essential audio parameters
for playout and recording sides. It will allow us to track if the native audio layer is working as intended.

BUG=NONE

Review-Url: https://codereview.webrtc.org/2132613002
Cr-Commit-Position: refs/heads/master@{#13440}
2016-07-12 09:18:46 +00:00
henrika
3f33e2aa54 Minor refactoring of the AudioDeviceBuffer class
BUG=NONE
NOTRY=true

Review-Url: https://codereview.webrtc.org/2117303002
Cr-Commit-Position: refs/heads/master@{#13389}
2016-07-06 07:34:02 +00:00
henrika
0fd6801c3c clang-format on AudioDeviceBuffer
BUG=NONE
R=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13377}
2016-07-04 11:01:41 +00:00
Max Morin
2c332bb682 Simplify logging statements.
BUG=NONE
R=henrika@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13375}
2016-07-04 07:03:54 +00:00
Max Morin
84cab205f5 UMA log for audio_device Init and Start(Playout|Recording). Make Init return a more specific error code, if possible.
BUG=webrtc:5761
R=asapersson@webrtc.org, henrika@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13361}
2016-07-01 11:35:31 +00:00
Max Morin
098e6c5d0a Logging and tracing of audio devices on Andriod.
Replaced invokations of WEBRTC_TRACE with LOG, which is
visible in the android system log.

BUG=NONE
R=henrika@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13308}
2016-06-28 07:36:39 +00:00
Max Morin
787eeede3d Formatted with clang-format. Checking if development environment is set up correctly.
BUG=NONE
R=henrika@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13270}
2016-06-23 08:42:23 +00:00
henrika
41ed7e1715 Avoid race when stopping audio unit on iOS
BUG=webrtc:5993
R=tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13234}
2016-06-21 09:41:15 +00:00
henrika
86eff72eec Adds logging in combination with restart of audio unit
BUG=
R=tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13233}
2016-06-21 09:26:57 +00:00
henrika
2d014be554 Resolves issue with bad audio using BT headsets on iOS.
BUG=webrtc:6004
R=tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13165}
2016-06-16 12:27:06 +00:00
tommi
a6219cc3ef FileWrapper[Impl] modifications and actually remove the "Impl" class.
This is a somewhat involved refactoring of this class. Here's an overview of the changes:

* FileWrapper can now be used as a regular class and instances allocated on the stack.
* The type now has support for move semantics and copy isn't allowed.
* New public ctor with FILE* that can be used instead of OpenFromFileHandle.
* New static Open() method.  The intent of this is to allow opening a file and getting back a FileWrapper instance.  Using this method instead of Create(), will allow us in the future to make the FILE* member pointer, to be const and simplify threading (get rid of the lock).
* Rename the Open() method to is_open() and make it inline.
* The FileWrapper interface is no longer a pure virtual interface.  There's only one implementation so there's no need to go through a vtable for everything.
* Functionality offered by the class, is now reduced.  No support for looping (not clear if that was actually useful to users of that flag), no need to implement the 'read_only_' functionality in the class, since file APIs implement that already, no support for *not* managing the file handle (this wasn't used).  OpenFromFileHandle always "manages" the file.
* Delete the unused WriteText() method and don't support opening files in text mode.  Text mode is only different on Windows and on Windows it translates \n to \r\n, which means that files such as log files, could have a slightly different format on Windows than other platforms.  Besides, tools on Windows can handle UNIX line endings.
* Remove FileName(), change Trace code to manage its own path.
* Rename id_ member variable to file_.
* Removed the open_ member variable since the same functionality can be gotten from just checking the file pointer.
* Don't call CloseFile inside of Write.  Write shouldn't be changing the state of the class beyond just attempting to write.
* Remove concept of looping from FileWrapper and never close inside of Read()
* Changed stream base classes to inherit from a common base class instead of both defining the Rewind method. Ultimately, Id' like to remove these interfaces and just have FileWrapper.
* Remove read_only param from OpenFromFileHandle
* Renamed size_in_bytes_ to position_, since it gets set to 0 when Rewind() is called (and the size actually does not change).
* Switch out rw lock for CriticalSection. The r/w lock was only used for reading when checking the open_ flag.

BUG=

Review-Url: https://codereview.webrtc.org/2054373002
Cr-Commit-Position: refs/heads/master@{#13155}
2016-06-15 17:30:18 +00:00
skvlad
880ffeb6c0 Optimize the repeated calls to AudioEffect.queryEffects() on Android
This CL eliminates repeated calls to AudioEffect.queryEffects() on Android when configuring the audio device. Each of these calls was taking 5-10 milliseconds on the devices I was testing (Nexus 4, Nexus 5), and setting up the audio device involved around 10 of these calls.

This change adds a method that checks the cached list of effects before calling the underlying operating system API; this eliminated about half of these calls. The other half happened inside static methods such as NoiseSuppressor.isAvailable(), which are just convenience wrappers for searching through the list of effects. These calls have been replaced with searching through the cached list of effects, reducing the time to configure audio processing effects from 60-80 ms to 5-10. This results in a similar improvement in call setup time.

BUG=

Review-Url: https://codereview.webrtc.org/2051323002
Cr-Commit-Position: refs/heads/master@{#13115}
2016-06-13 19:05:30 +00:00
kjellander
fb11424551 GN: Add modules_unittests
Changes:
* Enabled protobuf for iOS globally.
* Set WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE on a global
scope similar to GYP since tests depend on it.
* Added missing rtc_libvpx_build_vp9 variable.
* Moved out audio_coding defines into .gni file to avoid code duplication
* Renamed files to avoid object naming conflicts that GN disallows:
  * webrtc/modules/audio_processing/{echo_cancellation_unittest.cc->echo_cancellation_bit_exact_unittest.cc}
  * webrtc/modules/video_coding/codecs/vp9/{screenshare_layers_unittest.cc->vp9_screenshare_layers_unittest.cc}

BUG=webrtc:5949
TESTED=Built and ran the tests on Mac. Also ran:
gn gen out/Default --args="rtc_enable_bwe_test_logging=true"
and verified that more objects are being built (1885 vs 1883)
when compiling modules_unittests.

NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2041233006
Cr-Commit-Position: refs/heads/master@{#13108}
2016-06-13 07:19:53 +00:00
kjellander
82a94494b1 GN: Add rtc_media_unittests
Changes:
* Set WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE on a global scope
  to match GYP.
* Enable sctpdataengine_unittest.cc for iOS, which should have
  been done in https://codereview.webrtc.org/1587193006
* Renamed GN target rtc_base_test_utils -> rtc_base_tests_utils
  to match GYP.
* Added dependencies on call, modules/video_coding and video for
  rtc_media.
* Added dependency on audio for rtc_media_unitttests (couldn't be
  added to rtc_media due to circular dependency problem).

BUG=webrtc:5949
TESTED=Built and ran the tests on Mac.
NOTRY=True

Review-Url: https://codereview.webrtc.org/2050313002
Cr-Commit-Position: refs/heads/master@{#13106}
2016-06-13 05:12:10 +00:00
Taylor Brandstetter
5d97a9a05b Adding more detail to MessageQueue::Dispatch logging.
Every message will now be traced with the location from which it was
posted, including function name, file and line number.

This CL also writes a normal LOG message when the dispatch took more
than a certain amount of time (currently 50ms).

This logging should help us identify messages that are taking
longer than expected to be dispatched.

R=pthatcher@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13104}
2016-06-10 21:17:33 +00:00
Alex Glaznev
c88f558135 Fix Android audio playback mute.
TBR=henrika@webrtc.org

BUG=b/29066336

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

Cr-Commit-Position: refs/heads/master@{#13051}
2016-06-06 17:33:55 +00:00
Alex Glaznev
080be51294 Make WebRTCAudioTrack class public.
To access its public API.

TBR=henrika@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13044}
2016-06-03 22:33:39 +00:00
henrika
b50e84509f Adds WebRtcAudioTrack.setSpeakerMute() API
BUG=NONE

Review-Url: https://codereview.webrtc.org/2025423003
Cr-Commit-Position: refs/heads/master@{#13029}
2016-06-03 09:56:26 +00:00