AudioCaptureTrack.h (967B)
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/. */ 5 6 #ifndef MOZILLA_AUDIOCAPTURETRACK_H_ 7 #define MOZILLA_AUDIOCAPTURETRACK_H_ 8 9 #include "AudioMixer.h" 10 #include "MediaTrackGraph.h" 11 12 namespace mozilla { 13 14 class AbstractThread; 15 class DOMMediaStream; 16 17 /** 18 * See MediaTrackGraph::CreateAudioCaptureTrack. 19 */ 20 class AudioCaptureTrack : public ProcessedMediaTrack { 21 public: 22 explicit AudioCaptureTrack(TrackRate aRate); 23 virtual ~AudioCaptureTrack(); 24 25 void Start(); 26 27 void ProcessInput(GraphTime aFrom, GraphTime aTo, uint32_t aFlags) override; 28 29 uint32_t NumberOfChannels() const override; 30 31 protected: 32 AudioMixer mMixer; 33 bool mStarted; 34 bool mTrackCreated; 35 }; 36 } // namespace mozilla 37 38 #endif /* MOZILLA_AUDIOCAPTURETRACK_H_ */