diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /dom/media/AudioInputSource.h | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/media/AudioInputSource.h')
-rw-r--r-- | dom/media/AudioInputSource.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/dom/media/AudioInputSource.h b/dom/media/AudioInputSource.h index b44a3ae43a..8f69165719 100644 --- a/dom/media/AudioInputSource.h +++ b/dom/media/AudioInputSource.h @@ -12,6 +12,7 @@ #include "CubebInputStream.h" #include "CubebUtils.h" #include "TimeUnits.h" +#include "mozilla/MozPromise.h" #include "mozilla/ProfilerUtils.h" #include "mozilla/RefPtr.h" #include "mozilla/SPSCQueue.h" @@ -54,10 +55,17 @@ class AudioInputSource : public CubebInputStream::Listener { // The following functions should always be called in the same thread: They // are always run on MediaTrackGraph's graph thread. + // Sets up mStream. + void Init(); // Starts producing audio data. void Start(); // Stops producing audio data. void Stop(); + // Set the params to be applied in the platform for this source. + using SetRequestedProcessingParamsPromise = + MozPromise<cubeb_input_processing_params, int, true>; + RefPtr<SetRequestedProcessingParamsPromise> SetRequestedProcessingParams( + cubeb_input_processing_params aParams); // Returns the AudioSegment with aDuration of data inside. // The graph thread can change behind the scene, e.g., cubeb stream reinit due // to default output device changed). When this happens, we need to notify @@ -118,6 +126,11 @@ class AudioInputSource : public CubebInputStream::Listener { // An input-only cubeb stream operated within mTaskThread. UniquePtr<CubebInputStream> mStream; + // The params configured on the cubeb stream, after filtering away unsupported + // params. mTaskThread only. + cubeb_input_processing_params mConfiguredProcessingParams = + CUBEB_INPUT_PROCESSING_PARAM_NONE; + struct Empty {}; struct LatencyChangeData { |