Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(552)

Side by Side Diff: webrtc/api/objc/RTCRtpParameters.mm

Issue 1854393002: Objective C API to read and set RtpParameters (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added a missing blank line Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 _encodings) {
21 parameters.encodings.push_back(encoding.nativeParameters);
22 }
23 return parameters;
24 }
25
26 - (instancetype)initWithNativeParameters:
27 (const webrtc::RtpParameters &)nativeParameters {
28 if ([self init]) {
29 NSMutableArray *encodings = [[NSMutableArray alloc] init];
30 for (const auto &encoding : nativeParameters.encodings) {
31 [encodings addObject:[[RTCRtpEncodingParameters alloc]
32 initWithNativeParameters:encoding]];
33 }
34 _encodings = encodings;
35 }
36 return self;
37 }
38
39 - (instancetype)init {
tkchin_webrtc 2016/04/06 22:04:49 ditto
skvlad 2016/04/08 19:33:19 Done.
40 self = [super init];
41 return self;
42 }
43
44 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698