Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. | |
| 3 * | |
| 4 * Use of this source code is governed by a BSD-style license | |
| 5 * that can be found in the LICENSE file in the root of the source | |
| 6 * tree. An additional intellectual property rights grant can be found | |
| 7 * in the file PATENTS. All contributing project authors may | |
| 8 * be found in the AUTHORS file in the root of the source tree. | |
| 9 */ | |
| 10 | |
| 11 #import "RTCRtpParameters+Private.h" | |
| 12 #import "RTCRtpEncodingParameters+Private.h" | |
| 13 | |
| 14 @implementation RTCRtpParameters | |
| 15 | |
| 16 @synthesize encodings = _encodings; | |
| 17 | |
| 18 - (webrtc::RtpParameters)nativeParameters { | |
| 19 webrtc::RtpParameters parameters; | |
| 20 for (RTCRtpEncodingParameters* encoding in self.encodings) { | |
|
tkchin_webrtc
2016/04/05 18:48:15
ers *encoding in _encodings
(in case you're wonde
skvlad
2016/04/05 23:21:28
Done.
| |
| 21 parameters.encodings.push_back(encoding.nativeParameters); | |
| 22 } | |
| 23 return parameters; | |
| 24 } | |
| 25 | |
| 26 - (instancetype)initWithNativeParameters: | |
| 27 (const webrtc::RtpParameters&)nativeParameters { | |
|
tkchin_webrtc
2016/04/05 18:48:15
(const RtpParameters &)
skvlad
2016/04/05 23:21:28
Done.
| |
| 28 if (self = [super init]) { | |
| 29 NSMutableArray* encodings = [[NSMutableArray alloc] init]; | |
|
tkchin_webrtc
2016/04/05 18:48:15
ditto *, & and _ :)
skvlad
2016/04/05 23:21:28
Done.
| |
| 30 for (const auto& encoding : nativeParameters.encodings) { | |
| 31 [encodings addObject:[[RTCRtpEncodingParameters alloc] | |
| 32 initWithNativeParameters:encoding]]; | |
| 33 } | |
| 34 self.encodings = encodings; | |
| 35 } | |
| 36 return self; | |
| 37 } | |
| 38 | |
| 39 @end | |
| OLD | NEW |