webrtc/modules/audio_device
Markus Handell c89fdd716c Refactor the PlatformThread API.
PlatformThread's API is using old style function pointers, causes
casting, is unintuitive and forces artificial call sequences, and
is additionally possible to misuse in release mode.

Fix this by an API face lift:
1. The class is turned into a handle, which can be empty.
2. The only way of getting a non-empty PlatformThread is by calling
SpawnJoinable or SpawnDetached, clearly conveying the semantics to the
code reader.
3. Handles can be Finalized, which works differently for joinable and
detached threads:
  a) Handles for detached threads are simply closed where applicable.
  b) Joinable threads are joined before handles are closed.
4. The destructor finalizes handles. No explicit call is needed.

Fixed: webrtc:12727
Change-Id: Id00a0464edf4fc9e552b6a1fbb5d2e1280e88811
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215075
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33923}
2021-05-05 09:59:07 +00:00
..
android Use SequenceChecker from public API 2021-02-10 15:04:55 +00:00
dummy Refactor the PlatformThread API. 2021-05-05 09:59:07 +00:00
g3doc Fix documentation owners formating 2021-04-23 11:07:28 +00:00
include Replace more instances of rtc::RefCountedObject with make_ref_counted. 2021-04-27 17:01:59 +00:00
linux Refactor the PlatformThread API. 2021-05-05 09:59:07 +00:00
mac Refactor the PlatformThread API. 2021-05-05 09:59:07 +00:00
win Refactor the PlatformThread API. 2021-05-05 09:59:07 +00:00
audio_device_buffer.cc Move some RTC_LOG to RTC_DLOG. 2021-01-28 10:05:00 +00:00
audio_device_buffer.h Use SequenceChecker from public API 2021-02-10 15:04:55 +00:00
audio_device_config.h Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
audio_device_data_observer.cc Replace more instances of rtc::RefCountedObject with make_ref_counted. 2021-04-27 17:01:59 +00:00
audio_device_generic.cc Reporting audio device underrun counter 2019-08-16 11:49:55 +00:00
audio_device_generic.h Reporting audio device underrun counter 2019-08-16 11:49:55 +00:00
audio_device_impl.cc Replace more instances of rtc::RefCountedObject with make_ref_counted. 2021-04-27 17:01:59 +00:00
audio_device_impl.h Reporting audio device underrun counter 2019-08-16 11:49:55 +00:00
audio_device_name.cc Clarifies identification of default communication device in ADM2 2019-11-20 15:02:06 +00:00
audio_device_name.h Improves device enumeration in ADM2 for Windows. 2019-11-22 14:27:10 +00:00
audio_device_unittest.cc Use SequenceChecker from public API 2021-02-10 15:04:55 +00:00
BUILD.gn Replace RTC_DEPRECATED with ABSL_DEPRECATED 2021-02-22 12:53:23 +00:00
DEPS Reland "Remove old audio device implementation." 2019-04-10 06:44:42 +00:00
fine_audio_buffer.cc [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
fine_audio_buffer.h Adds stereo support to FineAudioBuffer for mobile platforms. 2018-04-24 11:58:54 +00:00
fine_audio_buffer_unittest.cc Format almost everything. 2019-07-08 13:45:15 +00:00
mock_audio_device_buffer.h In modules/audio_device replace mock macros with unified MOCK_METHOD macro 2020-05-19 09:11:48 +00:00
OWNERS Remove wildcard ownership for build files. 2020-02-19 14:05:46 +00:00