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

Unified Diff: webrtc/api/remoteaudiosource.cc

Issue 2099843003: Revert of Use VoiceChannel/VideoChannel directly from RtpSender/RtpReceiver. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/api/remoteaudiosource.h ('k') | webrtc/api/rtpreceiver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « webrtc/api/remoteaudiosource.h ('k') | webrtc/api/rtpreceiver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698