Add a 'remote' property to MediaSourceInterface. Also adding an implementation to the relevant sources we have (audio/video) and an extra check where we're casting a source into a local audio source :(
Additionally:
* Moving all implementation inside RemoteAudioTrack into AudioTrack and remove RemoteAudioTrack.
* AddSink/RemoveSink are now on all audio sources (like they are for video sources).
While doing this I found that some of our tests are broken :) and fixed them. They were broken because AudioTrack didn't previously do much such as updating its state.
BUG=chromium:569526
Review URL: https://codereview.webrtc.org/1522903002
Cr-Commit-Position: refs/heads/master@{#11026}
diff --git a/talk/app/webrtc/remoteaudiosource.cc b/talk/app/webrtc/remoteaudiosource.cc
index a35f0bb..e904dd9 100644
--- a/talk/app/webrtc/remoteaudiosource.cc
+++ b/talk/app/webrtc/remoteaudiosource.cc
@@ -106,6 +106,11 @@
return state_;
}
+bool RemoteAudioSource::remote() const {
+ RTC_DCHECK(main_thread_->IsCurrent());
+ return true;
+}
+
void RemoteAudioSource::SetVolume(double volume) {
RTC_DCHECK(volume >= 0 && volume <= 10);
for (auto* observer : audio_observers_)