Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: content/renderer/media/webrtc/media_stream_remote_audio_track.h

Issue 1514143003: Add support for unmixed audio from remote WebRTC remote tracks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix other include Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_audio_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 // TODO(tommi): Chrome shouldn't have to care about remote vs local so
16 // we should have a single track implementation that delegates to the
17 // sources that do different things depending on the type of source.
18 class MediaStreamRemoteAudioTrack : public MediaStreamAudioTrack {
16 public: 19 public:
17 explicit MediaStreamRemoteAudioTrack( 20 explicit MediaStreamRemoteAudioTrack(
18 const scoped_refptr<webrtc::AudioTrackInterface>& track); 21 const scoped_refptr<webrtc::AudioTrackInterface>& track);
19 ~MediaStreamRemoteAudioTrack() override; 22 ~MediaStreamRemoteAudioTrack() override;
20 23
21 void SetEnabled(bool enabled) override; 24 void SetEnabled(bool enabled) override;
22 void Stop() override; 25 void Stop() override;
23 26
27 void AddSink(MediaStreamAudioSink* sink) override;
28 void RemoveSink(MediaStreamAudioSink* sink) override;
29 media::AudioParameters GetOutputFormat() const override;
30
24 webrtc::AudioTrackInterface* GetAudioAdapter() override; 31 webrtc::AudioTrackInterface* GetAudioAdapter() override;
25 32
26 private: 33 private:
34 class AudioSink;
35 scoped_ptr<AudioSink> sink_;
27 const scoped_refptr<webrtc::AudioTrackInterface> track_; 36 const scoped_refptr<webrtc::AudioTrackInterface> track_;
28 }; 37 };
29 38
30 } // namespace content 39 } // namespace content
31 40
32 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_AUDIO_TRACK_H_ 41 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_AUDIO_TRACK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698