| Index: content/renderer/media/webrtc/webrtc_audio_sink_adapter.h
|
| diff --git a/content/renderer/media/webrtc/webrtc_audio_sink_adapter.h b/content/renderer/media/webrtc/webrtc_audio_sink_adapter.h
|
| index 4e70d194b5a0eb141b661713ea2dea62b91ad57a..85a418b2425baf50ffdcea686c645e144a29fd3a 100644
|
| --- a/content/renderer/media/webrtc/webrtc_audio_sink_adapter.h
|
| +++ b/content/renderer/media/webrtc/webrtc_audio_sink_adapter.h
|
| @@ -11,6 +11,7 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "content/public/renderer/media_stream_audio_sink.h"
|
| #include "media/audio/audio_parameters.h"
|
| +#include "media/base/audio_push_fifo.h"
|
|
|
| namespace webrtc {
|
| class AudioTrackSinkInterface;
|
| @@ -21,7 +22,8 @@ namespace content {
|
| // Adapter to the webrtc::AudioTrackSinkInterface of the audio track.
|
| // This class is used in between the MediaStreamAudioSink and
|
| // webrtc::AudioTrackSinkInterface. It gets data callback via the
|
| -// MediaStreamAudioSink::OnData() interface and pass the data to
|
| +// MediaStreamAudioSink::OnData() interface, re-chunks the data into the
|
| +// required 10ms chunks if needed, and passes the data to WebRTC via the
|
| // webrtc::AudioTrackSinkInterface.
|
| class WebRtcAudioSinkAdapter : public MediaStreamAudioSink {
|
| public:
|
| @@ -37,8 +39,13 @@ class WebRtcAudioSinkAdapter : public MediaStreamAudioSink {
|
| base::TimeTicks estimated_capture_time) override;
|
| void OnSetFormat(const media::AudioParameters& params) override;
|
|
|
| - webrtc::AudioTrackSinkInterface* const sink_;
|
| + // Called by AudioPushFifo zero or more times during the call to OnData().
|
| + // Delivers audio data with the required 10ms buffer size to |sink_|.
|
| + void DeliverRebufferedAudio(const media::AudioBus& audio_bus,
|
| + int frame_delay);
|
|
|
| + webrtc::AudioTrackSinkInterface* const sink_;
|
| + media::AudioPushFifo fifo_;
|
| media::AudioParameters params_;
|
| scoped_ptr<int16_t[]> interleaved_data_;
|
|
|
|
|