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