diff options
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 { |