summaryrefslogtreecommitdiffstats
path: root/dom/media/CubebUtils.h
diff options
context:
space:
mode:
Diffstat (limited to 'dom/media/CubebUtils.h')
-rw-r--r--dom/media/CubebUtils.h9
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();