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 "RTCRtpCodecParameters+Private.h" | |
tkchin_webrtc
2016/04/14 17:52:51
nit: one blank line after interface header import
Taylor Brandstetter
2016/04/14 18:17:22
Done.
| |
12 #import "webrtc/base/objc/NSString+StdString.h" | |
13 | |
14 @implementation RTCRtpCodecParameters | |
15 | |
16 @synthesize payloadType = _payloadType; | |
17 @synthesize mimeType = _mimeType; | |
18 @synthesize clockRate = _clockRate; | |
19 @synthesize channels = _channels; | |
20 | |
21 - (instancetype)init { | |
22 return [super init]; | |
23 } | |
24 | |
25 - (instancetype)initWithNativeParameters: | |
26 (const webrtc::RtpCodecParameters &)nativeParameters { | |
27 if (self = [self init]) { | |
28 _payloadType = nativeParameters.payload_type; | |
29 _mimeType = [NSString stringForStdString:nativeParameters.mime_type]; | |
30 _clockRate = nativeParameters.clock_rate; | |
31 _channels = nativeParameters.channels; | |
32 } | |
33 return self; | |
34 } | |
35 | |
36 - (webrtc::RtpCodecParameters)nativeParameters { | |
37 webrtc::RtpCodecParameters parameters; | |
38 parameters.payload_type = _payloadType; | |
39 parameters.mime_type = [NSString stdStringForString:_mimeType]; | |
40 parameters.clock_rate = _clockRate; | |
41 parameters.channels = _channels; | |
42 return parameters; | |
43 } | |
44 | |
45 @end | |
OLD | NEW |