diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /dom/media/DeviceInputTrack.h | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/media/DeviceInputTrack.h')
-rw-r--r-- | dom/media/DeviceInputTrack.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/dom/media/DeviceInputTrack.h b/dom/media/DeviceInputTrack.h index 6206dc0dfc..0a92ded13c 100644 --- a/dom/media/DeviceInputTrack.h +++ b/dom/media/DeviceInputTrack.h @@ -44,8 +44,7 @@ class NonNativeInputTrack; // } else { // MOZ_ASSERT(mInputs.Length() == 1); // AudioSegment data; -// DeviceInputConsumerTrack::GetInputSourceData(data, mInputs[0], aFrom, -// aTo); +// DeviceInputConsumerTrack::GetInputSourceData(data, aFrom, aTo); // // You can do audio data processing before appending to mSegment here. // GetData<AudioSegment>()->AppendFrom(&data); // } @@ -77,20 +76,22 @@ class DeviceInputConsumerTrack : public ProcessedMediaTrack { void DisconnectDeviceInput(); Maybe<CubebUtils::AudioDeviceID> DeviceId() const; NotNull<AudioDataListener*> GetAudioDataListener() const; - bool ConnectToNativeDevice() const; - bool ConnectToNonNativeDevice() const; + bool ConnectedToNativeDevice() const; + bool ConnectedToNonNativeDevice() const; // Any thread: DeviceInputConsumerTrack* AsDeviceInputConsumerTrack() override { return this; } - protected: // Graph thread API: - // Get the data in [aFrom, aTo) from aPort->GetSource() to aOutput. aOutput - // needs to be empty. - void GetInputSourceData(AudioSegment& aOutput, const MediaInputPort* aPort, - GraphTime aFrom, GraphTime aTo) const; + DeviceInputTrack* GetDeviceInputTrackGraphThread() const; + + protected: + // Get the data in [aFrom, aTo) from the device input to aOutput. aOutput + // needs to be empty. A device input must be connected. Graph thread. + void GetInputSourceData(AudioSegment& aOutput, GraphTime aFrom, + GraphTime aTo) const; // Main Thread variables: RefPtr<MediaInputPort> mPort; |