Adding getParameters/setParameters APIs to RtpReceiver.
This is similar to how a "receive" method is used to apply
RtpParameters to an RtpReceiver in ORTC. Currently, SetParameters
doesn't allow changing the parameters, so the main use of the API is
to retrieve the set of configured codecs. But other uses will likely
be made possible in the future.
R=glaznev@webrtc.org, pthatcher@webrtc.org, tkchin@webrtc.org
Review URL: https://codereview.webrtc.org/1917193008 .
Cr-Commit-Position: refs/heads/master@{#12761}
diff --git a/webrtc/api/rtpparameters.h b/webrtc/api/rtpparameters.h
index 729f841..5c79ab4 100644
--- a/webrtc/api/rtpparameters.h
+++ b/webrtc/api/rtpparameters.h
@@ -25,6 +25,9 @@
bool operator==(const RtpEncodingParameters& o) const {
return active == o.active && max_bitrate_bps == o.max_bitrate_bps;
}
+ bool operator!=(const RtpEncodingParameters& o) const {
+ return !(*this == o);
+ }
};
struct RtpCodecParameters {
@@ -38,6 +41,7 @@
return payload_type == o.payload_type && mime_type == o.mime_type &&
clock_rate == o.clock_rate && channels == o.channels;
}
+ bool operator!=(const RtpCodecParameters& o) const { return !(*this == o); }
};
struct RtpParameters {
@@ -47,6 +51,7 @@
bool operator==(const RtpParameters& o) const {
return encodings == o.encodings && codecs == o.codecs;
}
+ bool operator!=(const RtpParameters& o) const { return !(*this == o); }
};
} // namespace webrtc