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

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

Issue 1903663002: Build dynamic iOS SDK. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix test gyp Created 4 years, 7 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 "RTCRtpCodecParameters+Private.h"
12
13 #import "webrtc/base/objc/NSString+StdString.h"
14 #import "webrtc/media/base/mediaconstants.h"
15
16 const NSString * const kRtxCodecMimeType = @(cricket::kRtxCodecName);
17 const NSString * const kRedCodecMimeType = @(cricket::kRedCodecName);
18 const NSString * const kUlpfecCodecMimeType = @(cricket::kUlpfecCodecName);
19 const NSString * const kOpusCodecMimeType = @(cricket::kOpusCodecName);
20 const NSString * const kIsacCodecMimeType = @(cricket::kIsacCodecName);
21 const NSString * const kL16CodecMimeType = @(cricket::kL16CodecName);
22 const NSString * const kG722CodecMimeType = @(cricket::kG722CodecName);
23 const NSString * const kIlbcCodecMimeType = @(cricket::kIlbcCodecName);
24 const NSString * const kPcmuCodecMimeType = @(cricket::kPcmuCodecName);
25 const NSString * const kPcmaCodecMimeType = @(cricket::kPcmaCodecName);
26 const NSString * const kDtmfCodecMimeType = @(cricket::kDtmfCodecName);
27 const NSString * const kComfortNoiseCodecMimeType = @(cricket::kComfortNoiseCode cName);
28 const NSString * const kVp8CodecMimeType = @(cricket::kVp8CodecName);
29 const NSString * const kVp9CodecMimeType = @(cricket::kVp9CodecName);
30 const NSString * const kH264CodecMimeType = @(cricket::kH264CodecName);
31
32 @implementation RTCRtpCodecParameters
33
34 @synthesize payloadType = _payloadType;
35 @synthesize mimeType = _mimeType;
36 @synthesize clockRate = _clockRate;
37 @synthesize channels = _channels;
38
39 - (instancetype)init {
40 return [super init];
41 }
42
43 - (instancetype)initWithNativeParameters:
44 (const webrtc::RtpCodecParameters &)nativeParameters {
45 if (self = [self init]) {
46 _payloadType = nativeParameters.payload_type;
47 _mimeType = [NSString stringForStdString:nativeParameters.mime_type];
48 _clockRate = nativeParameters.clock_rate;
49 _channels = nativeParameters.channels;
50 }
51 return self;
52 }
53
54 - (webrtc::RtpCodecParameters)nativeParameters {
55 webrtc::RtpCodecParameters parameters;
56 parameters.payload_type = _payloadType;
57 parameters.mime_type = [NSString stdStringForString:_mimeType];
58 parameters.clock_rate = _clockRate;
59 parameters.channels = _channels;
60 return parameters;
61 }
62
63 @end
OLDNEW
« no previous file with comments | « webrtc/api/objc/RTCRtpCodecParameters.h ('k') | webrtc/api/objc/RTCRtpCodecParameters+Private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698