339 Commits

Author SHA1 Message Date
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
kjellander
bac0412e7f GN: Add system_wrappers_unittests, tools and tools_unittests
BUG=webrtc:5949
TESTED=Built and ran the tests on Mac.
NOTRY=True

Review-Url: https://codereview.webrtc.org/2025343002
Cr-Commit-Position: refs/heads/master@{#13007}
2016-06-02 09:18:57 +00:00
henrika
521f7a8db7 Moves ownership of OpenSL engine object to Android audio manager with the goal of adding support for OpenSL ES based audio capture.
BUG=webrtc:5925

Review-Url: https://codereview.webrtc.org/2019223004
Cr-Commit-Position: refs/heads/master@{#12975}
2016-05-31 14:03:26 +00:00
kjellander
080a1e3fa6 Fix iOS GN build and cleanup system_wrappers
Compile fixes for GN on iOS that finally gets our bots green.

Changes to system_wrappers:
* Updated to only use inclusive sources for maintainability
* Add a few missing GN headers.
* Cleanup GYP hack for atomic32_mac.cc
* Renamed changes sources to avoid problems with GYP/GN file
   suffix rules:
  - atomic32_mac.cc -> atomic32_darwin.cc
  - atomic32_posix.cc -> atomic32_non_darwin_unix.cc
See https://code.google.com/p/chromium/codesearch#chromium/src/build/config/BUILDCONFIG.gn&l=325
for details on which extensions can/cannot be used.

BUG=webrtc:5586
NOTRY=True

Review-Url: https://codereview.webrtc.org/1999723002
Cr-Commit-Position: refs/heads/master@{#12897}
2016-05-25 18:37:17 +00:00
henrika
1f0ad1085d Adds support for detection of pro-audio support on Android.
A new API is added which enables detection of support of pro-audio on
Android. This is part of a larger change and the new API is not used yet.
Most likely it will only be used for logging purposes.

BUG=webrtc:5925

Review-Url: https://codereview.webrtc.org/2015483002
Cr-Commit-Position: refs/heads/master@{#12890}
2016-05-25 12:15:19 +00:00
sakal
c00687ff5d Add an option to disable built-in AEC to AppRTC Android Demo
BUG=webrtc:5923

Review-Url: https://codereview.webrtc.org/2002093002
Cr-Commit-Position: refs/heads/master@{#12885}
2016-05-25 07:09:50 +00:00
kwiberg
fd8be3468a Remove webrtc/base/scoped_ptr.h
This is a re-land of https://codereview.webrtc.org/1942823002

TBR=tommi@webrtc.org
BUG=webrtc:5520

Review-Url: https://codereview.webrtc.org/1966423002
Cr-Commit-Position: refs/heads/master@{#12750}
2016-05-15 02:44:18 +00:00
kwiberg
6ab3db249b Revert of Remove webrtc/base/scoped_ptr.h (patchset #3 id:100001 of https://codereview.webrtc.org/1942823002/ )
Reason for revert:
Breaks user code. Said code needs to stop using scoped_ptr!

Original issue's description:
> Remove webrtc/base/scoped_ptr.h
>
> BUG=webrtc:5520
>
> NOTRY=True
>
> Committed: https://crrev.com/65fc62e9dd8a8716db625aaef76ab92f542ecc5a
> Cr-Commit-Position: refs/heads/master@{#12684}

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

Review-Url: https://codereview.webrtc.org/1965063003
Cr-Commit-Position: refs/heads/master@{#12686}
2016-05-11 12:07:33 +00:00
kwiberg
65fc62e9dd Remove webrtc/base/scoped_ptr.h
BUG=webrtc:5520

NOTRY=True

Review-Url: https://codereview.webrtc.org/1942823002
Cr-Commit-Position: refs/heads/master@{#12684}
2016-05-11 11:29:38 +00:00
Niels Möller
d28db7fd65 Delete all use of tick_util.h.
Depends on Chrome cl https://codereview.chromium.org/1888003002/, which was landed some time ago.

BUG=webrtc:5740
R=stefan@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12674}
2016-05-10 14:31:58 +00:00
tkchin
d251196d37 Provide isAudioEnabled flag to control audio unit.
- Also removes async invoker usage in favor of thread posting

BUG=

Review-Url: https://codereview.webrtc.org/1945563003
Cr-Commit-Position: refs/heads/master@{#12651}
2016-05-07 01:54:21 +00:00
Peter Boström
4adbbcfe7a Move ADM Create() method to public interface.
ADMs were previously created by CreateAudioDeviceModule which was
removed in previous refactoring without a replacement added.

BUG=
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12613}
2016-05-03 19:51:31 +00:00
henrika
7d4a6c3208 Adds timeout for audio record thread in Java layer
BUG=b/28448866
R=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12590}
2016-05-02 09:01:02 +00:00
tkchin
9eeb6240c9 Build dynamic iOS SDK.
- Places most ObjC code into webrtc/sdk/objc instead.
- New gyp targets to build, strip and export symbols for dylib.
- Removes old script used to generate dylib.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#12524}
2016-04-27 08:54:27 +00:00
kwiberg
1c7fdd86eb Remove calls to ScopedToUnique and UniqueToScoped
They're just no-ops now, and will soon go away.

BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#12510}
2016-04-26 15:18:13 +00:00
tkchin
efdd930dc9 Fix RTCAudioSession crash in removeDelegate.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#12320}
2016-04-11 19:01:06 +00:00
Peter Boström
dda52b9c3e Add performance tracing to AudioDevice inits.
Adds tracing to AudioDeviceModuleImpl::InitRecording and
AudioDeviceModuleImpl::StartRecording to visualize that they are a
significant part of startup time in performance recordings.

BUG=webrtc:5723
R=henrika@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12315}
2016-04-11 14:04:42 +00:00
henrika
9d7e8dd44e Adds Moto G 3rd Generation to HW AEC blacklist
BUG=b/27447146

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

Cr-Commit-Position: refs/heads/master@{#12278}
2016-04-07 11:56:08 +00:00
kjellander
95177d1e71 GN: Fix some build errors for iOS.
With these changes, the only problem seem to be the missing jpeg
library. See https://codereview.chromium.org/1806503002/ for more details on that.

BUG=webrtc:5195, webrtc:5748
NOTRY=True

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

Cr-Commit-Position: refs/heads/master@{#12273}
2016-04-07 07:14:06 +00:00
henrika
ef38b564ea Improves error handling for playout initialization on Android.
We no longer crash when initialization fails.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#12241}
2016-04-05 14:20:35 +00:00