Add HeaderExtensions to RtpParameters

Bug: webrtc:7580
Change-Id: I4fcf3e8bc4975a6b2baa6f24a17c254d2bf521d9
Reviewed-on: https://webrtc-review.googlesource.com/78288
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23584}
diff --git a/sdk/objc/Framework/Classes/PeerConnection/RTCRtpHeaderExtension.mm b/sdk/objc/Framework/Classes/PeerConnection/RTCRtpHeaderExtension.mm
new file mode 100644
index 0000000..3f448d7
--- /dev/null
+++ b/sdk/objc/Framework/Classes/PeerConnection/RTCRtpHeaderExtension.mm
@@ -0,0 +1,42 @@
+/*
+ *  Copyright 2018 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 "RTCRtpHeaderExtension+Private.h"
+
+#import "NSString+StdString.h"
+
+@implementation RTCRtpHeaderExtension
+
+@synthesize uri = _uri;
+@synthesize id = _id;
+@synthesize encrypted = _encrypted;
+
+- (instancetype)init {
+  return [super init];
+}
+
+- (instancetype)initWithNativeParameters:(const webrtc::RtpExtension &)nativeParameters {
+  if (self = [self init]) {
+    _uri = [NSString stringForStdString:nativeParameters.uri];
+    _id = nativeParameters.id;
+    _encrypted = nativeParameters.encrypt;
+  }
+  return self;
+}
+
+- (webrtc::RtpExtension)nativeParameters {
+  webrtc::RtpExtension extension;
+  extension.uri = [NSString stdStringForString:_uri];
+  extension.id = _id;
+  extension.encrypt = _encrypted;
+  return extension;
+}
+
+@end