12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #ifndef PC_AUDIO_TRACK_H_
- #define PC_AUDIO_TRACK_H_
- #include <string>
- #include "api/media_stream_interface.h"
- #include "api/scoped_refptr.h"
- #include "pc/media_stream_track.h"
- #include "rtc_base/thread_checker.h"
- namespace webrtc {
- class AudioTrack : public MediaStreamTrack<AudioTrackInterface>,
- public ObserverInterface {
- protected:
-
- AudioTrack(const std::string& label,
- const rtc::scoped_refptr<AudioSourceInterface>& source);
- AudioTrack() = delete;
- AudioTrack(const AudioTrack&) = delete;
- AudioTrack& operator=(const AudioTrack&) = delete;
- ~AudioTrack() override;
- public:
- static rtc::scoped_refptr<AudioTrack> Create(
- const std::string& id,
- const rtc::scoped_refptr<AudioSourceInterface>& source);
-
- std::string kind() const override;
- private:
-
- AudioSourceInterface* GetSource() const override;
- void AddSink(AudioTrackSinkInterface* sink) override;
- void RemoveSink(AudioTrackSinkInterface* sink) override;
-
- void OnChanged() override;
- private:
- const rtc::scoped_refptr<AudioSourceInterface> audio_source_;
- rtc::ThreadChecker thread_checker_;
- };
- }
- #endif
|