| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_WEBRTC_AUDIO_SINK_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_AUDIO_SINK_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_AUDIO_SINK_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_AUDIO_SINK_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
| 16 #include "base/synchronization/lock.h" | 16 #include "base/synchronization/lock.h" |
| 17 #include "content/common/content_export.h" | 17 #include "content/common/content_export.h" |
| 18 #include "content/public/renderer/media_stream_audio_sink.h" | 18 #include "content/public/renderer/media_stream_audio_sink.h" |
| 19 #include "content/renderer/media/media_stream_audio_level_calculator.h" | 19 #include "content/renderer/media/media_stream_audio_level_calculator.h" |
| 20 #include "content/renderer/media/media_stream_audio_processor.h" | 20 #include "content/renderer/media/media_stream_audio_processor.h" |
| 21 #include "media/base/audio_parameters.h" | 21 #include "media/base/audio_parameters.h" |
| 22 #include "media/base/audio_push_fifo.h" | 22 #include "media/base/audio_push_fifo.h" |
| 23 #include "third_party/webrtc/api/mediastreamtrack.h" | 23 #include "third_party/webrtc/api/mediastreamtrack.h" |
| 24 #include "third_party/webrtc/media/base/audiorenderer.h" | |
| 25 | 24 |
| 26 namespace content { | 25 namespace content { |
| 27 | 26 |
| 28 // Provides an implementation of the MediaStreamAudioSink which re-chunks audio | 27 // Provides an implementation of the MediaStreamAudioSink which re-chunks audio |
| 29 // data into the 10ms chunks required by WebRTC and then delivers the audio to | 28 // data into the 10ms chunks required by WebRTC and then delivers the audio to |
| 30 // one or more objects implementing the webrtc::AudioTrackSinkInterface. | 29 // one or more objects implementing the webrtc::AudioTrackSinkInterface. |
| 31 // | 30 // |
| 32 // The inner class, Adapter, implements the webrtc::AudioTrackInterface and | 31 // The inner class, Adapter, implements the webrtc::AudioTrackInterface and |
| 33 // manages one or more "WebRTC sinks" (i.e., instances of | 32 // manages one or more "WebRTC sinks" (i.e., instances of |
| 34 // webrtc::AudioTrackSinkInterface) which are added/removed on the WebRTC | 33 // webrtc::AudioTrackSinkInterface) which are added/removed on the WebRTC |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 // Used to DCHECK that OnSetFormat() and OnData() are called on the same | 173 // Used to DCHECK that OnSetFormat() and OnData() are called on the same |
| 175 // thread. | 174 // thread. |
| 176 base::ThreadChecker audio_thread_checker_; | 175 base::ThreadChecker audio_thread_checker_; |
| 177 | 176 |
| 178 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioSink); | 177 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioSink); |
| 179 }; | 178 }; |
| 180 | 179 |
| 181 } // namespace content | 180 } // namespace content |
| 182 | 181 |
| 183 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_AUDIO_SINK_H_ | 182 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_AUDIO_SINK_H_ |
| OLD | NEW |