Index: webrtc/media/base/fakemediaengine.h |
diff --git a/webrtc/media/base/fakemediaengine.h b/webrtc/media/base/fakemediaengine.h |
index d9a79ccca299f9c500bc7f13f043de3481a7ad90..fc59fa7d7d889c20b755271391df9bdc79019a5a 100644 |
--- a/webrtc/media/base/fakemediaengine.h |
+++ b/webrtc/media/base/fakemediaengine.h |
@@ -206,6 +206,8 @@ template <class Base> class RtpHelper : public Base { |
return ""; |
return send_streams_[0].cname; |
} |
+ const RtcpParameters& send_rtcp_parameters() { return send_rtcp_parameters_; } |
+ const RtcpParameters& recv_rtcp_parameters() { return recv_rtcp_parameters_; } |
bool ready_to_send() const { |
return ready_to_send_; |
@@ -246,6 +248,12 @@ template <class Base> class RtpHelper : public Base { |
send_extensions_ = extensions; |
return true; |
} |
+ void set_send_rtcp_parameters(const RtcpParameters& params) { |
+ send_rtcp_parameters_ = params; |
+ } |
+ void set_recv_rtcp_parameters(const RtcpParameters& params) { |
+ recv_rtcp_parameters_ = params; |
+ } |
virtual void OnPacketReceived(rtc::CopyOnWriteBuffer* packet, |
const rtc::PacketTime& packet_time) { |
rtp_packets_.push_back(std::string(packet->data<char>(), packet->size())); |
@@ -278,6 +286,8 @@ template <class Base> class RtpHelper : public Base { |
std::list<std::string> rtcp_packets_; |
std::vector<StreamParams> send_streams_; |
std::vector<StreamParams> receive_streams_; |
+ RtcpParameters send_rtcp_parameters_; |
+ RtcpParameters recv_rtcp_parameters_; |
std::set<uint32_t> muted_streams_; |
std::map<uint32_t, webrtc::RtpParameters> rtp_send_parameters_; |
std::map<uint32_t, webrtc::RtpParameters> rtp_receive_parameters_; |
@@ -318,6 +328,7 @@ class FakeVoiceMediaChannel : public RtpHelper<VoiceMediaChannel> { |
const AudioOptions& options() const { return options_; } |
int max_bps() const { return max_bps_; } |
virtual bool SetSendParameters(const AudioSendParameters& params) { |
+ set_send_rtcp_parameters(params.rtcp); |
return (SetSendCodecs(params.codecs) && |
SetSendRtpHeaderExtensions(params.extensions) && |
SetMaxSendBandwidth(params.max_bandwidth_bps) && |
@@ -325,6 +336,7 @@ class FakeVoiceMediaChannel : public RtpHelper<VoiceMediaChannel> { |
} |
virtual bool SetRecvParameters(const AudioRecvParameters& params) { |
+ set_recv_rtcp_parameters(params.rtcp); |
return (SetRecvCodecs(params.codecs) && |
SetRecvRtpHeaderExtensions(params.extensions)); |
} |
@@ -519,11 +531,13 @@ class FakeVideoMediaChannel : public RtpHelper<VideoMediaChannel> { |
} |
int max_bps() const { return max_bps_; } |
bool SetSendParameters(const VideoSendParameters& params) override { |
+ set_send_rtcp_parameters(params.rtcp); |
return (SetSendCodecs(params.codecs) && |
SetSendRtpHeaderExtensions(params.extensions) && |
SetMaxSendBandwidth(params.max_bandwidth_bps)); |
} |
bool SetRecvParameters(const VideoRecvParameters& params) override { |
+ set_recv_rtcp_parameters(params.rtcp); |
return (SetRecvCodecs(params.codecs) && |
SetRecvRtpHeaderExtensions(params.extensions)); |
} |
@@ -643,10 +657,12 @@ class FakeDataMediaChannel : public RtpHelper<DataMediaChannel> { |
int max_bps() const { return max_bps_; } |
virtual bool SetSendParameters(const DataSendParameters& params) { |
+ set_send_rtcp_parameters(params.rtcp); |
return (SetSendCodecs(params.codecs) && |
SetMaxSendBandwidth(params.max_bandwidth_bps)); |
} |
virtual bool SetRecvParameters(const DataRecvParameters& params) { |
+ set_recv_rtcp_parameters(params.rtcp); |
return SetRecvCodecs(params.codecs); |
} |
virtual bool SetSend(bool send) { return set_sending(send); } |