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

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

Issue 1885473004: Adding codecs to the RtpParameters returned by an RtpSender. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Adding mime type constants. 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 "RTCRtpCodecParameters+Private.h"
12
13 #import "webrtc/base/objc/NSString+StdString.h"
14
15 NSString * const kRtxCodecMimeType = @"rtx";
tkchin_webrtc 2016/04/14 21:11:47 nit: point at the constants directly? e.g. const N
Taylor Brandstetter 2016/04/14 22:03:31 Done.
16 NSString * const kRedCodecMimeType = @"RED";
17 NSString * const kUlpfecCodecMimeType = @"ulpfec";
18 NSString * const kOpusCodecMimeType = @"opus";
19 NSString * const kIsacCodecMimeType = @"ISAC";
20 NSString * const kL16CodecMimeType = @"L16";
21 NSString * const kG722CodecMimeType = @"G722";
22 NSString * const kIlbcCodecMimeType = @"ILBC";
23 NSString * const kPcmuCodecMimeType = @"PCMU";
24 NSString * const kPcmaCodecMimeType = @"PCMA";
25 NSString * const kDtmfCodecMimeType = @"telephone-event";
26 NSString * const kComfortNoiseCodecMimeType = @"CN";
27 NSString * const kVp8CodecMimeType = @"VP8";
28 NSString * const kVp9CodecMimeType = @"VP9";
29 NSString * const kH264CodecMimeType = @"H264";
30
31 @implementation RTCRtpCodecParameters
32
33 @synthesize payloadType = _payloadType;
34 @synthesize mimeType = _mimeType;
35 @synthesize clockRate = _clockRate;
36 @synthesize channels = _channels;
37
38 - (instancetype)init {
39 return [super init];
40 }
41
42 - (instancetype)initWithNativeParameters:
43 (const webrtc::RtpCodecParameters &)nativeParameters {
44 if (self = [self init]) {
45 _payloadType = nativeParameters.payload_type;
46 _mimeType = [NSString stringForStdString:nativeParameters.mime_type];
47 _clockRate = nativeParameters.clock_rate;
48 _channels = nativeParameters.channels;
49 }
50 return self;
51 }
52
53 - (webrtc::RtpCodecParameters)nativeParameters {
54 webrtc::RtpCodecParameters parameters;
55 parameters.payload_type = _payloadType;
56 parameters.mime_type = [NSString stdStringForString:_mimeType];
57 parameters.clock_rate = _clockRate;
58 parameters.channels = _channels;
59 return parameters;
60 }
61
62 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698