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/rtpreceiver.cc b/webrtc/api/rtpreceiver.cc
index 38245dc..1b52ce2 100644
--- a/webrtc/api/rtpreceiver.cc
+++ b/webrtc/api/rtpreceiver.cc
@@ -14,6 +14,7 @@
 #include "webrtc/api/audiotrack.h"
 #include "webrtc/api/videosourceproxy.h"
 #include "webrtc/api/videotrack.h"
+#include "webrtc/base/trace_event.h"
 
 namespace webrtc {
 
@@ -66,6 +67,15 @@
   provider_ = nullptr;
 }
 
+RtpParameters AudioRtpReceiver::GetParameters() const {
+  return provider_->GetAudioRtpReceiveParameters(ssrc_);
+}
+
+bool AudioRtpReceiver::SetParameters(const RtpParameters& parameters) {
+  TRACE_EVENT0("webrtc", "AudioRtpReceiver::SetParameters");
+  return provider_->SetAudioRtpReceiveParameters(ssrc_, parameters);
+}
+
 void AudioRtpReceiver::Reconfigure() {
   if (!provider_) {
     return;
@@ -113,4 +123,13 @@
   provider_ = nullptr;
 }
 
+RtpParameters VideoRtpReceiver::GetParameters() const {
+  return provider_->GetVideoRtpReceiveParameters(ssrc_);
+}
+
+bool VideoRtpReceiver::SetParameters(const RtpParameters& parameters) {
+  TRACE_EVENT0("webrtc", "VideoRtpReceiver::SetParameters");
+  return provider_->SetVideoRtpReceiveParameters(ssrc_, parameters);
+}
+
 }  // namespace webrtc