OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_AUDIO_TRACK_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_AUDIO_TRACK_H_ |
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_AUDIO_TRACK_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_AUDIO_TRACK_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "content/renderer/media/media_stream_track.h" | 9 #include "content/renderer/media/media_stream_track.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 | 12 |
13 // MediaStreamRemoteAudioTrack is a WebRTC specific implementation of an | 13 // MediaStreamRemoteAudioTrack is a WebRTC specific implementation of an |
14 // audio track received from a PeerConnection. | 14 // audio track received from a PeerConnection. |
15 class MediaStreamRemoteAudioTrack : public MediaStreamTrack { | 15 class MediaStreamRemoteAudioTrack : public MediaStreamAudioTrack { |
perkj_chrome
2015/12/11 12:31:38
Do you in the end want to distinguish between loca
tommi (sloooow) - chröme
2015/12/11 15:36:51
In the end I'd like to have only one. The video i
| |
16 public: | 16 public: |
17 explicit MediaStreamRemoteAudioTrack( | 17 explicit MediaStreamRemoteAudioTrack( |
18 const scoped_refptr<webrtc::AudioTrackInterface>& track); | 18 const scoped_refptr<webrtc::AudioTrackInterface>& track); |
19 ~MediaStreamRemoteAudioTrack() override; | 19 ~MediaStreamRemoteAudioTrack() override; |
20 | 20 |
21 void SetEnabled(bool enabled) override; | 21 void SetEnabled(bool enabled) override; |
22 void Stop() override; | 22 void Stop() override; |
23 | 23 |
24 void AddSink(MediaStreamAudioSink* sink) override; | |
25 void RemoveSink(MediaStreamAudioSink* sink) override; | |
26 media::AudioParameters GetOutputFormat() const override; | |
27 | |
24 webrtc::AudioTrackInterface* GetAudioAdapter() override; | 28 webrtc::AudioTrackInterface* GetAudioAdapter() override; |
25 | 29 |
26 private: | 30 private: |
31 class AudioSink; | |
32 scoped_ptr<AudioSink> sink_; | |
27 const scoped_refptr<webrtc::AudioTrackInterface> track_; | 33 const scoped_refptr<webrtc::AudioTrackInterface> track_; |
28 }; | 34 }; |
29 | 35 |
30 } // namespace content | 36 } // namespace content |
31 | 37 |
32 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_AUDIO_TRACK_H_ | 38 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_AUDIO_TRACK_H_ |
OLD | NEW |