Objective C API to read and set RtpParameters
This change adds the Objective C API functions to get and set RtpSender's
RtpParameters, which allows setting bitrate limits for audio and video and
turning off RtpSenders to pre-initialize the encoder.
This CL adds only the smallest set of methods required to support bitrate
limiting - there is no way to create an RtpSender, for example, or to set
its track. The only supported functionality is this:
RTCPeerConnection.senders - a read-only property returning the array
of all RTCRtpSenders for the connection.
RTCRtpSender.parameters - a read-only property returning the current
parameters
RTCRtpSender.setParameters: - a method to change the parameters.
RTCRtpSender.track - a read-only property returning the
RTCMediaStreamTrack corresponding to the sender. It is necessary
to be able to identify RTCRtpSenders for video and audio. The
track object is of the base RTCMediaStreamTrack type, not of the
specific subclass for audio and video - just like it is in the
Java API.
BUG=
Review URL: https://codereview.webrtc.org/1854393002
Cr-Commit-Position: refs/heads/master@{#12297}
diff --git a/webrtc/api/objc/RTCPeerConnection.h b/webrtc/api/objc/RTCPeerConnection.h
index e0f9b78..471a8de 100644
--- a/webrtc/api/objc/RTCPeerConnection.h
+++ b/webrtc/api/objc/RTCPeerConnection.h
@@ -18,6 +18,7 @@
@class RTCMediaStream;
@class RTCMediaStreamTrack;
@class RTCPeerConnectionFactory;
+@class RTCRtpSender;
@class RTCSessionDescription;
@class RTCStatsReport;
@@ -115,6 +116,12 @@
@property(nonatomic, readonly) RTCIceConnectionState iceConnectionState;
@property(nonatomic, readonly) RTCIceGatheringState iceGatheringState;
+/** Gets all RTCRtpSenders associated with this peer connection.
+ * Note: reading this property returns different instances of RTCRtpSender.
+ * Use isEqual: instead of == to compare RTCRtpSender instances.
+ */
+@property(nonatomic, readonly) NSArray<RTCRtpSender *> *senders;
+
- (instancetype)init NS_UNAVAILABLE;
/** Sets the PeerConnection's global configuration to |configuration|.