OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #import <Foundation/Foundation.h> | 11 #import <Foundation/Foundation.h> |
12 | 12 |
13 #import <WebRTC/RTCMacros.h> | 13 #import <WebRTC/RTCMacros.h> |
14 | 14 |
15 NS_ASSUME_NONNULL_BEGIN | 15 NS_ASSUME_NONNULL_BEGIN |
16 | 16 |
17 RTC_EXTERN const NSString * const kRTCRtxCodecMimeType; | 17 RTC_EXTERN const NSString * const kRTCRtxCodecName; |
18 RTC_EXTERN const NSString * const kRTCRedCodecMimeType; | 18 RTC_EXTERN const NSString * const kRTCRedCodecName; |
19 RTC_EXTERN const NSString * const kRTCUlpfecCodecMimeType; | 19 RTC_EXTERN const NSString * const kRTCUlpfecCodecName; |
20 RTC_EXTERN const NSString * const kRTCFlexfecCodecMimeType; | 20 RTC_EXTERN const NSString * const kRTCFlexfecCodecName; |
21 RTC_EXTERN const NSString * const kRTCOpusCodecMimeType; | 21 RTC_EXTERN const NSString * const kRTCOpusCodecName; |
22 RTC_EXTERN const NSString * const kRTCIsacCodecMimeType; | 22 RTC_EXTERN const NSString * const kRTCIsacCodecName; |
23 RTC_EXTERN const NSString * const kRTCL16CodecMimeType; | 23 RTC_EXTERN const NSString * const kRTCL16CodecName; |
24 RTC_EXTERN const NSString * const kRTCG722CodecMimeType; | 24 RTC_EXTERN const NSString * const kRTCG722CodecName; |
25 RTC_EXTERN const NSString * const kRTCIlbcCodecMimeType; | 25 RTC_EXTERN const NSString * const kRTCIlbcCodecName; |
26 RTC_EXTERN const NSString * const kRTCPcmuCodecMimeType; | 26 RTC_EXTERN const NSString * const kRTCPcmuCodecName; |
27 RTC_EXTERN const NSString * const kRTCPcmaCodecMimeType; | 27 RTC_EXTERN const NSString * const kRTCPcmaCodecName; |
28 RTC_EXTERN const NSString * const kRTCDtmfCodecMimeType; | 28 RTC_EXTERN const NSString * const kRTCDtmfCodecName; |
29 RTC_EXTERN const NSString * const kRTCComfortNoiseCodecMimeType; | 29 RTC_EXTERN const NSString * const kRTCComfortNoiseCodecName; |
30 RTC_EXTERN const NSString * const kRTCVp8CodecMimeType; | 30 RTC_EXTERN const NSString * const kRTCVp8CodecName; |
31 RTC_EXTERN const NSString * const kRTCVp9CodecMimeType; | 31 RTC_EXTERN const NSString * const kRTCVp9CodecName; |
32 RTC_EXTERN const NSString * const kRTCH264CodecMimeType; | 32 RTC_EXTERN const NSString * const kRTCH264CodecName; |
33 | 33 |
34 /** Defined in http://w3c.github.io/webrtc-pc/#idl-def-RTCRtpCodecParameters */ | 34 /** Defined in http://w3c.github.io/webrtc-pc/#idl-def-RTCRtpCodecParameters */ |
35 RTC_EXPORT | 35 RTC_EXPORT |
36 @interface RTCRtpCodecParameters : NSObject | 36 @interface RTCRtpCodecParameters : NSObject |
37 | 37 |
38 /** The RTP payload type. */ | 38 /** The RTP payload type. */ |
39 @property(nonatomic, assign) int payloadType; | 39 @property(nonatomic, assign) int payloadType; |
40 | 40 |
41 /** | 41 /** |
42 * The codec MIME type. Valid types are listed in: | 42 * The codec MIME subtype. Valid types are listed in: |
43 * http://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml#rtp-param
eters-2 | 43 * http://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml#rtp-param
eters-2 |
44 * | 44 * |
45 * Several supported types are represented by the constants above. | 45 * Several supported types are represented by the constants above. |
46 */ | 46 */ |
47 @property(nonatomic, nonnull) NSString *mimeType; | 47 @property(nonatomic, readonly, nonnull) NSString *name; |
| 48 |
| 49 /** |
| 50 * The media type of this codec. Equivalent to MIME top-level type. |
| 51 * |
| 52 * Valid values are kRTCMediaStreamTrackKindAudio and |
| 53 * kRTCMediaStreamTrackKindVideo. |
| 54 */ |
| 55 @property(nonatomic, readonly, nonnull) NSString *kind; |
48 | 56 |
49 /** The codec clock rate expressed in Hertz. */ | 57 /** The codec clock rate expressed in Hertz. */ |
50 @property(nonatomic, assign) int clockRate; | 58 @property(nonatomic, readonly, nullable) NSNumber *clockRate; |
51 | 59 |
52 /** The number of channels (mono=1, stereo=2). */ | 60 /** |
53 @property(nonatomic, assign) int channels; | 61 * The number of channels (mono=1, stereo=2). |
| 62 * Set to null for video codecs. |
| 63 **/ |
| 64 @property(nonatomic, readonly, nullable) NSNumber *numChannels; |
54 | 65 |
55 - (instancetype)init NS_DESIGNATED_INITIALIZER; | 66 - (instancetype)init NS_DESIGNATED_INITIALIZER; |
56 | 67 |
57 @end | 68 @end |
58 | 69 |
59 NS_ASSUME_NONNULL_END | 70 NS_ASSUME_NONNULL_END |
OLD | NEW |