1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-*/
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef MOZILLA_AUDIOCAPTURETRACK_H_
7 #define MOZILLA_AUDIOCAPTURETRACK_H_
9 #include "MediaTrackGraph.h"
10 #include "AudioMixer.h"
19 * See MediaTrackGraph::CreateAudioCaptureTrack.
21 class AudioCaptureTrack
: public ProcessedMediaTrack
,
22 public MixerCallbackReceiver
{
24 explicit AudioCaptureTrack(TrackRate aRate
);
25 virtual ~AudioCaptureTrack();
29 void ProcessInput(GraphTime aFrom
, GraphTime aTo
, uint32_t aFlags
) override
;
31 uint32_t NumberOfChannels() const override
;
34 void MixerCallback(AudioDataValue
* aMixedBuffer
, AudioSampleFormat aFormat
,
35 uint32_t aChannels
, uint32_t aFrames
,
36 uint32_t aSampleRate
) override
;
41 } // namespace mozilla
43 #endif /* MOZILLA_AUDIOCAPTURETRACK_H_ */