Index: content/renderer/media/media_stream_audio_track.h |
diff --git a/content/renderer/media/media_stream_audio_track.h b/content/renderer/media/media_stream_audio_track.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8a80bc10bcf1c5c8781ebb738c88bc14ee14da38 |
--- /dev/null |
+++ b/content/renderer/media/media_stream_audio_track.h |
@@ -0,0 +1,49 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_TRACK_H_ |
+#define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_TRACK_H_ |
+ |
+#include "content/renderer/media/media_stream_track.h" |
+ |
+namespace webrtc { |
+class AudioTrackInterface; |
+} // namespace webrtc |
+ |
+namespace content { |
+ |
+class MediaStreamAudioSink; |
+ |
+class CONTENT_EXPORT MediaStreamAudioTrack : public MediaStreamTrack { |
+ public: |
+ explicit MediaStreamAudioTrack(bool is_local_track); |
+ ~MediaStreamAudioTrack() override; |
+ |
+ static MediaStreamAudioTrack* GetTrack( |
+ const blink::WebMediaStreamTrack& track); |
+ |
+ // Add a sink to the track. This function will trigger a OnSetFormat() |
+ // call on the |sink|. |
+ // Called on the main render thread. |
+ virtual void AddSink(MediaStreamAudioSink* sink) = 0; |
+ |
+ // Remove a sink from the track. |
+ // Called on the main render thread. |
+ virtual void RemoveSink(MediaStreamAudioSink* sink) = 0; |
+ |
+ // TODO(tommi, xians): Remove this method. |
+ virtual webrtc::AudioTrackInterface* GetAudioAdapter(); |
+ |
+ // Returns the output format of the capture source. May return an invalid |
+ // AudioParameters if the format is not yet available. |
+ // Called on the main render thread. |
+ virtual media::AudioParameters GetOutputFormat() const = 0; |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioTrack); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_TRACK_H_ |