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}
This is a reland of 1b871d0753
Original change's description:
> Replacing rtc::Thread with task queue for TestAudioDeviceModule.
>
> This prepares for running it in simulated time.
>
> TBR=henrika@webrtc.org
>
> Bug: webrtc:10465
> Change-Id: I9b29b8af9aeba7f0c8209ca77294a63d8068ff1a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126481
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27083}
TBR=henrika@webrtc.org
Bug: webrtc:10465
Change-Id: Icda8043fb5b1156129bc3b706bf8f190782b0921
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127520
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27093}
This prepares for running it in simulated time.
TBR=henrika@webrtc.org
Bug: webrtc:10465
Change-Id: I9b29b8af9aeba7f0c8209ca77294a63d8068ff1a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126481
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27083}
This CL applies clang-tidy's modernize-use-override [1] to the
WebRTC codebase.
All changes in this CL are automatically generated by both clang-tidy
and 'git cl format'.
[1] - https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html
Bug: webrtc:10252
Change-Id: I2bb8bd90fa8adb90aa33861fe7c788132a819a20
Reviewed-on: https://webrtc-review.googlesource.com/c/120412
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26461}
Create events with |manual_reset| and |initially_signalled| both false
(used to be both true). Delete calls to Set and Reset events from the
{Start,Stop}{Playout,Recording} methods. Then, for each event, there
remains a single call to Set, in the ProcessingAudio loop, and a
single call to Wait, in WaitForPlayoutEnd and WaitForRecordingEnd,
respectively.
Bug: webrtc:9962
Change-Id: Ia358b4a36896e2378ad6166f3786d8d71392bf1b
Reviewed-on: https://webrtc-review.googlesource.com/c/109562
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25518}
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}
This is a reland of 9ea5765f78
Original change's description:
> Refactor TestAudioDeviceModule to not depend on EventTimerWrapper.
>
> In addition, let the processing thread loop explicitly, and not use
> the deprecated builtin looping in PlatformThread.
>
> Bug: webrtc:3380
> Change-Id: I5171ce3457b80f922c8284259882da63c8f146f1
> Reviewed-on: https://webrtc-review.googlesource.com/96544
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24492}
Bug: webrtc:3380
Change-Id: I39c6b35d24182475b33a7a321cdf3b3ac9b8979a
Reviewed-on: https://webrtc-review.googlesource.com/97861
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24602}
This reverts commit cd87e014f3.
Reason for revert: Somehow introduces a race where rtc::Thread auto-wrapping may be applied to the TestAudioDevice thread rather than the main thread. This causes failures when running video_engine_tests without any test filter.
Original change's description:
> Reland "Refactor TestAudioDeviceModule to not depend on EventTimerWrapper."
>
> This is a reland of 9ea5765f78
>
> Original change's description:
> > Refactor TestAudioDeviceModule to not depend on EventTimerWrapper.
> >
> > In addition, let the processing thread loop explicitly, and not use
> > the deprecated builtin looping in PlatformThread.
> >
> > Bug: webrtc:3380
> > Change-Id: I5171ce3457b80f922c8284259882da63c8f146f1
> > Reviewed-on: https://webrtc-review.googlesource.com/96544
> > Commit-Queue: Niels Moller <nisse@webrtc.org>
> > Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> > Reviewed-by: Artem Titov <titovartem@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#24492}
>
> Bug: webrtc:3380
> Change-Id: I671e3a60ace6ade765a8537b7e20e36f1782a60d
> Reviewed-on: https://webrtc-review.googlesource.com/97320
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24528}
TBR=henrika@webrtc.org,nisse@webrtc.org,titovartem@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
# Skip anyway, needed for a two-step revert.
No-try: True
Bug: webrtc:3380
Change-Id: Ia7c8cfab36b8259f150b5ccd0c28defd0e7237f6
Reviewed-on: https://webrtc-review.googlesource.com/97682
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24552}
This is a reland of 9ea5765f78
Original change's description:
> Refactor TestAudioDeviceModule to not depend on EventTimerWrapper.
>
> In addition, let the processing thread loop explicitly, and not use
> the deprecated builtin looping in PlatformThread.
>
> Bug: webrtc:3380
> Change-Id: I5171ce3457b80f922c8284259882da63c8f146f1
> Reviewed-on: https://webrtc-review.googlesource.com/96544
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24492}
Bug: webrtc:3380
Change-Id: I671e3a60ace6ade765a8537b7e20e36f1782a60d
Reviewed-on: https://webrtc-review.googlesource.com/97320
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24528}
This reverts commit 9ea5765f78.
Reason for revert: Makes the perf test RampUpTest.AudioTransportSequenceNumber fail on windows, almost every time.
Original change's description:
> Refactor TestAudioDeviceModule to not depend on EventTimerWrapper.
>
> In addition, let the processing thread loop explicitly, and not use
> the deprecated builtin looping in PlatformThread.
>
> Bug: webrtc:3380
> Change-Id: I5171ce3457b80f922c8284259882da63c8f146f1
> Reviewed-on: https://webrtc-review.googlesource.com/96544
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24492}
TBR=henrika@webrtc.org,nisse@webrtc.org,titovartem@webrtc.org
Change-Id: I8867a22d695494bd5abfda6a97f0719cb3ff3d66
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:3380
Reviewed-on: https://webrtc-review.googlesource.com/96840
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24496}
In addition, let the processing thread loop explicitly, and not use
the deprecated builtin looping in PlatformThread.
Bug: webrtc:3380
Change-Id: I5171ce3457b80f922c8284259882da63c8f146f1
Reviewed-on: https://webrtc-review.googlesource.com/96544
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24492}
Because thread_ object is created in Init, destructor used to crash when
calling thread_->Stop() because it was referencing a null pointer.
Bug: webrtc:9404
Change-Id: I1c943d0fa50f9341aaa516b32495bb25bf4d664b
Reviewed-on: https://webrtc-review.googlesource.com/84122
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23682}
This allows constructing TestAudioDeviceModule on a different thread
than the worker thread and avoids unnecessary invoke. Before,
thread->Start() would fail in a thread check.
Bug: b/79961243
Change-Id: I5c55d8feada2b0ae12bc121f3f795e76a8d04059
Reviewed-on: https://webrtc-review.googlesource.com/82941
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23574}
Extend TestAudioDeviceModule API to be able to create WavReader/WavWriter from rtc::PlatformFile
Bug: webrtc:8946
Change-Id: Ieea16be91c40a5928689cdeaa8a17d75fee0cf82
Reviewed-on: https://webrtc-review.googlesource.com/63266
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22576}
Cleanup after moving test/fake_audio_device to
modules/audio_device/include/test_audio_device.
Hide implementation of test audio device module in the anonymous namespace.
Bug: webrtc:8946
Change-Id: I2d49c3ec5d43eeb5f155d38de95f69ed3c537805
Reviewed-on: https://webrtc-review.googlesource.com/61426
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22401}
This reverts commit 8ea5f9ae5b.
Reason for revert: breaks downstream project
Original change's description:
> Separate test/fake_audio_device on API and implementation.
>
> Adding ability of injecting audio in end to end tests, that are using
> WebRTC. For this purpose as a 1st step test/fake_audio_device will
> be moved to production part of WebRTC source code and renamed to
> test_audio_device_module. Old header is replaced with alias to the
> new one and will be deleted after a while.
>
> Change-Id: I5284d1dd46ce9bf86cf43268e855520606fa8c5c
>
> Bug: webrtc:8946
> Change-Id: I5284d1dd46ce9bf86cf43268e855520606fa8c5c
> Reviewed-on: https://webrtc-review.googlesource.com/58086
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22289}
TBR=kwiberg@webrtc.org,titovartem@webrtc.org
Change-Id: I88d9c4f09cc576ed7c9182dcf0a873d25a8bab54
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8946
Reviewed-on: https://webrtc-review.googlesource.com/59720
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22291}
Adding ability of injecting audio in end to end tests, that are using
WebRTC. For this purpose as a 1st step test/fake_audio_device will
be moved to production part of WebRTC source code and renamed to
test_audio_device_module. Old header is replaced with alias to the
new one and will be deleted after a while.
Change-Id: I5284d1dd46ce9bf86cf43268e855520606fa8c5c
Bug: webrtc:8946
Change-Id: I5284d1dd46ce9bf86cf43268e855520606fa8c5c
Reviewed-on: https://webrtc-review.googlesource.com/58086
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22289}