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/RTCRtpEncodingParameters+Private.h b/webrtc/api/objc/RTCRtpEncodingParameters+Private.h
new file mode 100644
index 0000000..9b752d2
--- /dev/null
+++ b/webrtc/api/objc/RTCRtpEncodingParameters+Private.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2016 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import <Foundation/Foundation.h>
+
+#import "webrtc/api/objc/RTCRtpEncodingParameters.h"
+
+#include "webrtc/api/rtpparameters.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface RTCRtpEncodingParameters ()
+
+/** Returns the equivalent native RtpEncodingParameters structure. */
+@property(nonatomic, readonly) webrtc::RtpEncodingParameters nativeParameters;
+
+/** Initialize the object with a native RtpEncodingParameters structure. */
+- (instancetype)initWithNativeParameters:
+ (const webrtc::RtpEncodingParameters &)nativeParameters;
+
+@end
+
+NS_ASSUME_NONNULL_END