diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
commit | a90a5cba08fdf6c0ceb95101c275108a152a3aed (patch) | |
tree | 532507288f3defd7f4dcf1af49698bcb76034855 /dom/media/CubebUtils.h | |
parent | Adding debian version 126.0.1-1. (diff) | |
download | firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/media/CubebUtils.h')
-rw-r--r-- | dom/media/CubebUtils.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/dom/media/CubebUtils.h b/dom/media/CubebUtils.h index c05c8d2449..a59d72bbd6 100644 --- a/dom/media/CubebUtils.h +++ b/dom/media/CubebUtils.h @@ -16,10 +16,12 @@ class AudioDeviceInfo; MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(cubeb_stream_prefs) +MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(cubeb_input_processing_params) namespace mozilla { class CallbackThreadRegistry; +class SharedThreadPool; namespace CubebUtils { @@ -35,6 +37,8 @@ struct ToCubebFormat<AUDIO_FORMAT_S16> { static const cubeb_sample_format value = CUBEB_SAMPLE_S16NE; }; +nsCString ProcessingParamsToString(cubeb_input_processing_params aParams); + class CubebHandle { public: NS_INLINE_DECL_THREADSAFE_REFCOUNTING(CubebHandle) @@ -62,6 +66,11 @@ void ShutdownLibrary(); bool SandboxEnabled(); +// A thread pool containing only one thread to execute the cubeb operations. We +// should always use this thread to init, destroy, start, or stop cubeb streams, +// to avoid data racing or deadlock issues across platforms. +already_AddRefed<SharedThreadPool> GetCubebOperationThread(); + // Returns the maximum number of channels supported by the audio hardware. uint32_t MaxNumberOfChannels(); |