| Index: content/renderer/media/webrtc_local_audio_track.h
|
| diff --git a/content/renderer/media/webrtc_local_audio_track.h b/content/renderer/media/webrtc_local_audio_track.h
|
| index 6952722068cfb327ed60977e2764e817c3f9a46d..24573e9a32b2723b974b3428a2915ea02e1e0916 100644
|
| --- a/content/renderer/media/webrtc_local_audio_track.h
|
| +++ b/content/renderer/media/webrtc_local_audio_track.h
|
| @@ -10,7 +10,6 @@
|
|
|
| #include "base/synchronization/lock.h"
|
| #include "base/threading/thread_checker.h"
|
| -#include "content/renderer/media/webrtc_audio_device_impl.h"
|
| #include "content/renderer/media/webrtc_local_audio_source_provider.h"
|
| #include "third_party/libjingle/source/talk/app/webrtc/mediaconstraintsinterface.h"
|
| #include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h"
|
| @@ -27,12 +26,14 @@ class AudioBus;
|
|
|
| namespace content {
|
|
|
| +class MediaStreamAudioSink;
|
| +class MediaStreamAudioSinkOwner;
|
| +class PeerConnectionAudioSink;
|
| class WebAudioCapturerSource;
|
| class WebRtcAudioCapturer;
|
| -class WebRtcAudioCapturerSinkOwner;
|
|
|
| // A WebRtcLocalAudioTrack instance contains the implementations of
|
| -// MediaStreamTrack and WebRtcAudioCapturerSink.
|
| +// MediaStreamTrack and MediaStreamAudioSink.
|
| // When an instance is created, it will register itself as a track to the
|
| // WebRtcAudioCapturer to get the captured data, and forward the data to
|
| // its |sinks_|. The data flow can be stopped by disabling the audio track.
|
| @@ -48,14 +49,20 @@ class CONTENT_EXPORT WebRtcLocalAudioTrack
|
| webrtc::AudioSourceInterface* track_source,
|
| const webrtc::MediaConstraintsInterface* constraints);
|
|
|
| - // Add a sink to the track. This function will trigger a SetCaptureFormat()
|
| + // Add a sink to the track. This function will trigger a OnSetFormat()
|
| // call on the |sink|.
|
| // Called on the main render thread.
|
| - void AddSink(WebRtcAudioCapturerSink* sink);
|
| + void AddSink(MediaStreamAudioSink* sink);
|
|
|
| // Remove a sink from the track.
|
| // Called on the main render thread.
|
| - void RemoveSink(WebRtcAudioCapturerSink* sink);
|
| + void RemoveSink(MediaStreamAudioSink* sink);
|
| +
|
| + // Add/remove PeerConnection sink to/from the track.
|
| + // TODO(xians): Remove these two methods after PeerConnection can use the
|
| + // same sink interface as MediaStreamAudioSink.
|
| + void AddSink(PeerConnectionAudioSink* sink);
|
| + void RemoveSink(PeerConnectionAudioSink* sink);
|
|
|
| // Starts the local audio track. Called on the main render thread and
|
| // should be called only once when audio track is created.
|
| @@ -75,7 +82,7 @@ class CONTENT_EXPORT WebRtcLocalAudioTrack
|
| // Method called by the capturer to set the audio parameters used by source
|
| // of the capture data..
|
| // Call on the capture audio thread.
|
| - void SetCaptureFormat(const media::AudioParameters& params);
|
| + void OnSetFormat(const media::AudioParameters& params);
|
|
|
| blink::WebAudioSourceProvider* audio_source_provider() const {
|
| return source_provider_.get();
|
| @@ -92,7 +99,7 @@ class CONTENT_EXPORT WebRtcLocalAudioTrack
|
| virtual ~WebRtcLocalAudioTrack();
|
|
|
| private:
|
| - typedef std::list<scoped_refptr<WebRtcAudioCapturerSinkOwner> > SinkList;
|
| + typedef std::list<scoped_refptr<MediaStreamAudioSinkOwner> > SinkList;
|
|
|
| // cricket::AudioCapturer implementation.
|
| virtual void AddChannel(int channel_id) OVERRIDE;
|
|
|