blob: 5d3cac5c96a00d19c47ef605cf340c823bd8680f [file] [log] [blame]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001/*
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 <Foundation/Foundation.h>
12
13#import "RTCMacros.h"
14
15NS_ASSUME_NONNULL_BEGIN
16
17RTC_EXTERN const NSString *const kRTCRtxCodecName;
18RTC_EXTERN const NSString *const kRTCRedCodecName;
19RTC_EXTERN const NSString *const kRTCUlpfecCodecName;
20RTC_EXTERN const NSString *const kRTCFlexfecCodecName;
21RTC_EXTERN const NSString *const kRTCOpusCodecName;
22RTC_EXTERN const NSString *const kRTCIsacCodecName;
23RTC_EXTERN const NSString *const kRTCL16CodecName;
24RTC_EXTERN const NSString *const kRTCG722CodecName;
25RTC_EXTERN const NSString *const kRTCIlbcCodecName;
26RTC_EXTERN const NSString *const kRTCPcmuCodecName;
27RTC_EXTERN const NSString *const kRTCPcmaCodecName;
28RTC_EXTERN const NSString *const kRTCDtmfCodecName;
29RTC_EXTERN const NSString *const kRTCComfortNoiseCodecName;
30RTC_EXTERN const NSString *const kRTCVp8CodecName;
31RTC_EXTERN const NSString *const kRTCVp9CodecName;
32RTC_EXTERN const NSString *const kRTCH264CodecName;
33
34/** Defined in http://w3c.github.io/webrtc-pc/#idl-def-RTCRtpCodecParameters */
Mirko Bonadeie8d57242018-09-17 10:22:56 +020035RTC_OBJC_EXPORT
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020036@interface RTCRtpCodecParameters : NSObject
37
38/** The RTP payload type. */
39@property(nonatomic, assign) int payloadType;
40
41/**
42 * The codec MIME subtype. Valid types are listed in:
43 * http://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml#rtp-parameters-2
44 *
45 * Several supported types are represented by the constants above.
46 */
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;
56
57/** The codec clock rate expressed in Hertz. */
58@property(nonatomic, readonly, nullable) NSNumber *clockRate;
59
60/**
61 * The number of channels (mono=1, stereo=2).
62 * Set to null for video codecs.
63 **/
64@property(nonatomic, readonly, nullable) NSNumber *numChannels;
65
66/** The "format specific parameters" field from the "a=fmtp" line in the SDP */
67@property(nonatomic, readonly, nonnull) NSDictionary *parameters;
68
69- (instancetype)init NS_DESIGNATED_INITIALIZER;
70
71@end
72
73NS_ASSUME_NONNULL_END