Enable SSRC 0 in MediaChannel methods
Refactor voice engine and video engine to use default methods instead of
treating 0 as a special value.
Bug: webrtc:8694
Change-Id: I47c211c6e870cdec737d6b0d05df29a9b534a011
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158600
Reviewed-by: Markus Handell <handellm@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Saurav Das <dinosaurav@chromium.org>
Cr-Commit-Position: refs/heads/master@{#30010}
diff --git a/media/base/fake_media_engine.h b/media/base/fake_media_engine.h
index aa713d0..3df8f85 100644
--- a/media/base/fake_media_engine.h
+++ b/media/base/fake_media_engine.h
@@ -168,6 +168,9 @@
}
return webrtc::RtpParameters();
}
+ virtual webrtc::RtpParameters GetDefaultRtpReceiveParameters() const {
+ return webrtc::RtpParameters();
+ }
bool IsStreamMuted(uint32_t ssrc) const {
bool ret = muted_streams_.find(ssrc) != muted_streams_.end();
@@ -338,6 +341,8 @@
bool InsertDtmf(uint32_t ssrc, int event_code, int duration) override;
bool SetOutputVolume(uint32_t ssrc, double volume) override;
+ bool SetDefaultOutputVolume(double volume) override;
+
bool GetOutputVolume(uint32_t ssrc, double* volume);
bool SetBaseMinimumPlayoutDelayMs(uint32_t ssrc, int delay_ms) override;
@@ -349,6 +354,8 @@
void SetRawAudioSink(
uint32_t ssrc,
std::unique_ptr<webrtc::AudioSinkInterface> sink) override;
+ void SetDefaultRawAudioSink(
+ std::unique_ptr<webrtc::AudioSinkInterface> sink) override;
std::vector<webrtc::RtpSource> GetSources(uint32_t ssrc) const override;
@@ -415,6 +422,8 @@
bool GetSendCodec(VideoCodec* send_codec) override;
bool SetSink(uint32_t ssrc,
rtc::VideoSinkInterface<webrtc::VideoFrame>* sink) override;
+ void SetDefaultSink(
+ rtc::VideoSinkInterface<webrtc::VideoFrame>* sink) override;
bool HasSink(uint32_t ssrc) const;
bool SetSend(bool send) override;