| Index: webrtc/api/remoteaudiosource.cc
|
| diff --git a/webrtc/api/remoteaudiosource.cc b/webrtc/api/remoteaudiosource.cc
|
| index 47213fa299015ec3c7e46e3809a698a02a941950..14eb82bbe3e8e745f90715731d7307a4df6c3829 100644
|
| --- a/webrtc/api/remoteaudiosource.cc
|
| +++ b/webrtc/api/remoteaudiosource.cc
|
| @@ -15,6 +15,7 @@
|
| #include <memory>
|
| #include <utility>
|
|
|
| +#include "webrtc/api/mediastreamprovider.h"
|
| #include "webrtc/base/checks.h"
|
| #include "webrtc/base/constructormagic.h"
|
| #include "webrtc/base/logging.h"
|
| @@ -41,7 +42,7 @@
|
| class RemoteAudioSource::Sink : public AudioSinkInterface {
|
| public:
|
| explicit Sink(RemoteAudioSource* source) : source_(source) {}
|
| - ~Sink() override { source_->OnAudioChannelGone(); }
|
| + ~Sink() override { source_->OnAudioProviderGone(); }
|
|
|
| private:
|
| void OnData(const AudioSinkInterface::Data& audio) override {
|
| @@ -55,10 +56,10 @@
|
|
|
| rtc::scoped_refptr<RemoteAudioSource> RemoteAudioSource::Create(
|
| uint32_t ssrc,
|
| - cricket::VoiceChannel* channel) {
|
| + AudioProviderInterface* provider) {
|
| rtc::scoped_refptr<RemoteAudioSource> ret(
|
| new rtc::RefCountedObject<RemoteAudioSource>());
|
| - ret->Initialize(ssrc, channel);
|
| + ret->Initialize(ssrc, provider);
|
| return ret;
|
| }
|
|
|
| @@ -75,12 +76,12 @@
|
| }
|
|
|
| void RemoteAudioSource::Initialize(uint32_t ssrc,
|
| - cricket::VoiceChannel* channel) {
|
| + AudioProviderInterface* provider) {
|
| RTC_DCHECK(main_thread_->IsCurrent());
|
| - // To make sure we always get notified when the channel goes out of scope,
|
| + // To make sure we always get notified when the provider goes out of scope,
|
| // we register for callbacks here and not on demand in AddSink.
|
| - if (channel) { // May be null in tests.
|
| - channel->SetRawAudioSink(
|
| + if (provider) { // May be null in tests.
|
| + provider->SetRawAudioSink(
|
| ssrc, std::unique_ptr<AudioSinkInterface>(new Sink(this)));
|
| }
|
| }
|
| @@ -144,8 +145,8 @@
|
| }
|
| }
|
|
|
| -void RemoteAudioSource::OnAudioChannelGone() {
|
| - // Called when the audio channel is deleted. It may be the worker thread
|
| +void RemoteAudioSource::OnAudioProviderGone() {
|
| + // Called when the data provider is deleted. It may be the worker thread
|
| // in libjingle or may be a different worker thread.
|
| main_thread_->Post(RTC_FROM_HERE, new MessageHandler(this));
|
| }
|
|
|