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}
This commit is contained in:
Taylor Brandstetter
2016-05-16 11:40:30 -07:00
parent 8bce67b745
commit db0cd9e774
33 changed files with 898 additions and 236 deletions

View File

@ -17,6 +17,7 @@
#import "RTCMediaConstraints+Private.h"
#import "RTCMediaStream+Private.h"
#import "RTCPeerConnectionFactory+Private.h"
#import "RTCRtpReceiver+Private.h"
#import "RTCRtpSender+Private.h"
#import "RTCSessionDescription+Private.h"
#import "RTCStatsReport+Private.h"
@ -342,6 +343,18 @@ void PeerConnectionDelegateAdapter::OnIceCandidate(
return senders;
}
- (NSArray<RTCRtpReceiver *> *)receivers {
std::vector<rtc::scoped_refptr<webrtc::RtpReceiverInterface>> nativeReceivers(
_peerConnection->GetReceivers());
NSMutableArray *receivers = [[NSMutableArray alloc] init];
for (const auto &nativeReceiver : nativeReceivers) {
RTCRtpReceiver *receiver =
[[RTCRtpReceiver alloc] initWithNativeRtpReceiver:nativeReceiver];
[receivers addObject:receiver];
}
return receivers;
}
#pragma mark - Private
+ (webrtc::PeerConnectionInterface::SignalingState)nativeSignalingStateForState: