Index: talk/app/webrtc/remoteaudiotrack.h |
diff --git a/talk/app/webrtc/remoteaudiotrack.h b/talk/app/webrtc/remoteaudiotrack.h |
index 4ce4e792763e79a5f9f84fb98011054277375ae9..c9240ebf3ac3c4f6daa2a24698956a8c63e6626f 100644 |
--- a/talk/app/webrtc/remoteaudiotrack.h |
+++ b/talk/app/webrtc/remoteaudiotrack.h |
@@ -28,4 +28,50 @@ |
#ifndef TALK_APP_WEBRTC_REMOTEAUDIOTRACK_H_ |
#define TALK_APP_WEBRTC_REMOTEAUDIOTRACK_H_ |
+#include <string> |
+ |
+#include "talk/app/webrtc/mediastreaminterface.h" |
+#include "talk/app/webrtc/mediastreamtrack.h" |
+#include "talk/app/webrtc/notifier.h" |
+#include "webrtc/base/scoped_ptr.h" |
+#include "webrtc/base/scoped_ref_ptr.h" |
+ |
+namespace webrtc { |
+ |
+class RemoteAudioSource; |
+ |
+class RemoteAudioTrack : public MediaStreamTrack<AudioTrackInterface>, |
+ public ObserverInterface { |
+ protected: |
+ // Protected ctor to force use of factory method. |
+ RemoteAudioTrack(const std::string& label, |
+ const rtc::scoped_refptr<RemoteAudioSource>& source); |
+ ~RemoteAudioTrack() override; |
+ |
+ public: |
+ static rtc::scoped_refptr<RemoteAudioTrack> Create( |
+ const std::string& id, |
+ const rtc::scoped_refptr<RemoteAudioSource>& source); |
+ |
+ private: |
+ // MediaStreamTrack implementation. |
+ std::string kind() const override; |
+ |
+ // AudioTrackInterface implementation. |
+ AudioSourceInterface* GetSource() const override; |
+ |
+ void AddSink(AudioTrackSinkInterface* sink) override; |
+ void RemoveSink(AudioTrackSinkInterface* sink) override; |
+ bool GetSignalLevel(int* level) override; |
+ |
+ // ObserverInterface implementation. |
+ void OnChanged() override; |
+ |
+ private: |
+ const rtc::scoped_refptr<RemoteAudioSource> audio_source_; |
+ RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RemoteAudioTrack); |
+}; |
+ |
+} // namespace webrtc |
+ |
#endif // TALK_APP_WEBRTC_REMOTEAUDIOTRACK_H_ |