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/localaudiosource.h b/talk/app/webrtc/localaudiosource.h
index 557745b..5158eb1 100644
--- a/talk/app/webrtc/localaudiosource.h
+++ b/talk/app/webrtc/localaudiosource.h
@@ -48,16 +48,17 @@
const PeerConnectionFactoryInterface::Options& options,
const MediaConstraintsInterface* constraints);
- virtual SourceState state() const { return source_state_; }
+ SourceState state() const override { return source_state_; }
+ bool remote() const override { return false; }
+
virtual const cricket::AudioOptions& options() const { return options_; }
- protected:
- LocalAudioSource()
- : source_state_(kInitializing) {
- }
+ void AddSink(AudioTrackSinkInterface* sink) override {}
+ void RemoveSink(AudioTrackSinkInterface* sink) override {}
- ~LocalAudioSource() {
- }
+ protected:
+ LocalAudioSource() : source_state_(kInitializing) {}
+ ~LocalAudioSource() override {}
private:
void Initialize(const PeerConnectionFactoryInterface::Options& options,