OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_TRACK_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_TRACK_H_ |
| 7 |
| 8 #include "content/renderer/media/media_stream_track.h" |
| 9 |
| 10 namespace webrtc { |
| 11 class AudioTrackInterface; |
| 12 } // namespace webrtc |
| 13 |
| 14 namespace content { |
| 15 |
| 16 class MediaStreamAudioSink; |
| 17 |
| 18 class CONTENT_EXPORT MediaStreamAudioTrack : public MediaStreamTrack { |
| 19 public: |
| 20 explicit MediaStreamAudioTrack(bool is_local_track); |
| 21 ~MediaStreamAudioTrack() override; |
| 22 |
| 23 static MediaStreamAudioTrack* GetTrack( |
| 24 const blink::WebMediaStreamTrack& track); |
| 25 |
| 26 // Add a sink to the track. This function will trigger a OnSetFormat() |
| 27 // call on the |sink|. |
| 28 // Called on the main render thread. |
| 29 virtual void AddSink(MediaStreamAudioSink* sink) = 0; |
| 30 |
| 31 // Remove a sink from the track. |
| 32 // Called on the main render thread. |
| 33 virtual void RemoveSink(MediaStreamAudioSink* sink) = 0; |
| 34 |
| 35 // TODO(tommi, xians): Remove this method. |
| 36 virtual webrtc::AudioTrackInterface* GetAudioAdapter(); |
| 37 |
| 38 // Returns the output format of the capture source. May return an invalid |
| 39 // AudioParameters if the format is not yet available. |
| 40 // Called on the main render thread. |
| 41 virtual media::AudioParameters GetOutputFormat() const = 0; |
| 42 |
| 43 private: |
| 44 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioTrack); |
| 45 }; |
| 46 |
| 47 } // namespace content |
| 48 |
| 49 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_TRACK_H_ |
OLD | NEW |