This reverts commit 7534ebd2bf.
Reason for revert: Downstream projects have been updated, try it again.
R=perkj@webrtc.org
Bug: webrtc:7452
Change-Id: Ice48a563a6da499b6050b6f6e21bb0a18cd34f57
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271841
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40386}
This reverts commit 6e4d7e606c.
Reason for revert: Still breaks downstream build (though in a different way this time)
Original change's description:
> Reland "Delete old Android ADM."
>
> This is a reland of commit 4ec3e9c988
>
> Original change's description:
> > Delete old Android ADM.
> >
> > The schedule move Android ADM code to sdk directory have been around
> > for several years, but the old code still not delete.
> >
> > Bug: webrtc:7452
> > Change-Id: I0f75c680f71f0b2ce614de6cbd9f124c2a59d453
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264620
> > Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> > Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
> > Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#37174}
>
> Bug: webrtc:7452
> Change-Id: Icabad23e72c8258a854b7809a93811161517266c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265872
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37236}
Bug: webrtc:7452
Change-Id: Ide8fbd55fadd7aed9989053afff7c63c04f1320f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266023
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Owners-Override: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37242}
This is a reland of commit 4ec3e9c988
Original change's description:
> Delete old Android ADM.
>
> The schedule move Android ADM code to sdk directory have been around
> for several years, but the old code still not delete.
>
> Bug: webrtc:7452
> Change-Id: I0f75c680f71f0b2ce614de6cbd9f124c2a59d453
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264620
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37174}
Bug: webrtc:7452
Change-Id: Icabad23e72c8258a854b7809a93811161517266c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265872
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37236}
This reverts commit 4ec3e9c988.
Reason for revert: Causes downstream build error.
Original change's description:
> Delete old Android ADM.
>
> The schedule move Android ADM code to sdk directory have been around
> for several years, but the old code still not delete.
>
> Bug: webrtc:7452
> Change-Id: I0f75c680f71f0b2ce614de6cbd9f124c2a59d453
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264620
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37174}
Bug: webrtc:7452
Change-Id: If094e0a3ef5a3d340cbd5dfa0a8a88c3e97ba0bf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265393
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37180}
The schedule move Android ADM code to sdk directory have been around
for several years, but the old code still not delete.
Bug: webrtc:7452
Change-Id: I0f75c680f71f0b2ce614de6cbd9f124c2a59d453
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264620
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37174}
This is essentially replacing `new rtc::RefCountedObject` with
`rtc::make_ref_counted` in many files. In a couple of places I
made minor tweaks to make things compile such as adding parenthesis
when they were missing.
Bug: webrtc:12701
Change-Id: I3828dbf3ee0eb0232f3a47067474484ac2f4aed2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215973
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33852}
Some locations in the WebRTC codebase RTC_LOG the value of the
__FUNCTION__ macro which probably is useful in debug mode. Moving
these instances to RTC_DLOG saves ~10 KiB on arm64.
Bug: webrtc:11986
Change-Id: I5d81cc459d2850657a712b9aed80c187edf49a3a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/203981
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33086}
This CL renames the internal macros LINUX_ALSA and LINUX_PULSE and adds
the prefix WEBRTC_. Since these macros are internal to WebRTC, it is
better to use a prefix.
Bug: None
Change-Id: I2a07fa569a4da168006cc36f32e4dbb98a75814b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171514
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30885}
Since it is a WebRTC-only macro, let's prefix it with WEBRTC_.
Bug: None
Change-Id: I309666858ea898dc7cd1a68c21be190f98c87b11
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129935
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27327}
The type rtc::scoped_refptr<T> is now part of api/. Please include it from
api/scoped_refptr.h.
More info: See: https://groups.google.com/forum/#!topic/discuss-webrtc/Mme2MSz4z4o.
Bug: webrtc:9887, webrtc:8205
No-Try: True
Change-Id: Ic6c7c81e226e59f12f7933e472f573ae097b55bf
Reviewed-on: https://webrtc-review.googlesource.com/c/119041
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26414}
When using WebRTC in iOS this Warning is shown for every single call even if stereo is not being used at all.
Change-Id: I0cc71620b9deb0692544101d78c0801968edbb26
Bug: webrtc:10146
Change-Id: I0cc71620b9deb0692544101d78c0801968edbb26
Reviewed-on: https://webrtc-review.googlesource.com/c/85283
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26133}
This CL is the result of running include-what-you-use tool on part
of the code base (audio target and dependencies) plus manual fixes.
bug: webrtc:8311
Change-Id: I277d281ce943c3ecc1bd45fd8d83055931743604
Reviewed-on: https://webrtc-review.googlesource.com/c/106280
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25311}
Second round of the new Windows ADM is now ready for review. Main
changes are:
Supports internal (automatic) restart of audio streams when an active
audio stream disconnects (happens when a device is removed).
Adds support for IAudioClient3 and IAudioClient2 for platforms which
supports it (>Win8 and >Win10).
Modifies the threading model to support restart "from the inside" on
the native audio thread.
Adds two new test methods for the ADM to emulate restart events or
stream-switch events.
Adds two new test methods to support rate conversion to ensure that
audio can be tested in loopback even if devices runs at different
sample rates.
Added initial components for low-latency support. Verified that it works
but disabled it with a flag for now.
Bug: webrtc:9265
Change-Id: Ia8e577daabea6b433f2c2eabab4e46ce8added6a
Reviewed-on: https://webrtc-review.googlesource.com/86020
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24578}
Summary of what this CL does:
Existing users can keep using the old ADM for Windows as before.
A new ADM for Windows is created and a dedicated factory method is used
to create it. The old way (using AudioDeviceImpl) is not utilized.
The new ADM is based on a structure where most of the "action" takes
place in new AudioInput/AudioOutput implementations. This is inline
with our mobile platforms and also makes it easier to break out common
parts into a base class.
The AudioDevice unittest has always mainly focused on the "Start/Stop"-
parts of the ADM and not the complete ADM interface. This new ADM supports
all tests in AudioDeviceTest and is therefore tested in combination with
the old version. A value-parametrized test us added for Windows builds.
Improved readability, threading model and makes the code easier to maintain.
Uses the previously landed methods in webrtc::webrtc_win::core_audio_utility.
Bug: webrtc:9265
Change-Id: If2894b44528e74a181cf7ad1216f57386ee3a24d
Reviewed-on: https://webrtc-review.googlesource.com/78060
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23554}
int32_t SetLoudspeakerStatus(bool enable)
int32_t GetLoudspeakerStatus(bool* enabled) const
These APIs are only implemented on iOS and they do not belong in the
native audio layer since the client can achieve the same functionality
by using the shared audio session in sdk/objc/Framework/Headers/WebRTC/RTCAudioSession.h.
It also gives the client a better flexibility in how the audio routing is done.
Bug: webrtc:7306
Change-Id: I853e2f57e0f5ae0a0f9fc4729ce961d81f92588b
Reviewed-on: https://webrtc-review.googlesource.com/23740
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20721}
In order to create a clean CL to switch to RTC_ prefixed LOG macros
this CL runs `git cl format --full` on the files with LOG macros in
the following directories:
- modules/audio_device
- modules/media_file
- modules/video_capture
This CL has been automatically generated with:
for m in PLOG \
LOG_TAG \
LOG_GLEM \
LOG_GLE_EX \
LOG_GLE \
LAST_SYSTEM_ERROR \
LOG_ERRNO_EX \
LOG_ERRNO \
LOG_ERR_EX \
LOG_ERR \
LOG_V \
LOG_F \
LOG_T_F \
LOG_E \
LOG_T \
LOG_CHECK_LEVEL_V \
LOG_CHECK_LEVEL \
LOG
do
for d in media_file video_capture audio_device; do
cd modules/$d
git grep -l $m | grep -E "\.(cc|h|m|mm)$" | xargs sed -i "1 s/$/ /"
cd ../..
done
done
git cl format --full
Bug: webrtc:8452
Change-Id: I2858b6928e6bd79957f2e5e0b07028eb68a304b2
Reviewed-on: https://webrtc-review.googlesource.com/21322
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20613}
Unit test now checks that ADM:Init() works before any test runs.
It means that all tests will be skipped on bots that lack Pulse
support which is as how it worked before this CL as well. But then,
we detected the lack of support by checking that the audio layer had
changed from Pulse to Alsa.
As a consequence, I also decided to inject fake/mock ADMs in more
unit tests. One was actually already injected for other reasons
(see https://codereview.webrtc.org/2997383002/) but it had accidentally
been "reverted" later in combination with other changes.
To summarize: before this change we had a set of unit tests where real
audio was tested but it was not the intention of the test or required.
In addition, some Linux bots (VM:s) did not support PulseAudio and on
them the tests relied on a fallback mechanism to ALSA to work, i.e.,
we had a rather complex dependency on hardware. This dependency has now
been removed and it should result in more stable tests.
Bug: webrtc:7306, webrtc:7806
Change-Id: Ia0485658c04a4ef3b3f2dc0d557d73738067304b
Reviewed-on: https://webrtc-review.googlesource.com/8640
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20307}
This is in preparation for deleting the include in rtc_base/refcount.h,
but that change has to wait for some downstream applications to
not rely in the indirect include.
Partial reland of "Make rtc_base/refcount.h self contained, not including refcountedobject.h."
This is a reland of b7239a9dc8
Original change's description:
> Make rtc_base/refcount.h self contained, not including refcountedobject.h.
>
> The refcount.h file doesn't depend on anything from
> refcountedobject.h. The motivation of this change to make it possible
> to add additional declarations to refcount.h, and include it from
> refcountedobject.h.
>
> Bug: webrtc:8270
> Change-Id: I24f6131f471e675570968d00065ff9b1f55e3373
> Reviewed-on: https://webrtc-review.googlesource.com/5760
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20106}
Bug: webrtc:8270
Change-Id: I63a42712f6c1ec83823c629d1a954fd1a04d4a6c
Reviewed-on: https://webrtc-review.googlesource.com/7281
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20185}