From 8dd16259287f58f9273002717ec4d27e97127719 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:43:14 +0200 Subject: Merging upstream version 127.0. Signed-off-by: Daniel Baumann --- dom/media/CubebUtils.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'dom/media/CubebUtils.h') 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 { 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 GetCubebOperationThread(); + // Returns the maximum number of channels supported by the audio hardware. uint32_t MaxNumberOfChannels(); -- cgit v1.2.3