blob: 56b353215a2f0742db297130e11c771e866ff278 [file] [log] [blame]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001/*
2 * Copyright 2017 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
Mirko Bonadeie8d57242018-09-17 10:22:56 +020015RTC_OBJC_EXPORT extern NSString *const kRTCVideoCodecH264Name;
16RTC_OBJC_EXPORT extern NSString *const kRTCLevel31ConstrainedHigh;
17RTC_OBJC_EXPORT extern NSString *const kRTCLevel31ConstrainedBaseline;
18RTC_OBJC_EXPORT extern NSString *const kRTCMaxSupportedH264ProfileLevelConstrainedHigh;
19RTC_OBJC_EXPORT extern NSString *const kRTCMaxSupportedH264ProfileLevelConstrainedBaseline;
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020020
21/** H264 Profiles and levels. */
22typedef NS_ENUM(NSUInteger, RTCH264Profile) {
23 RTCH264ProfileConstrainedBaseline,
24 RTCH264ProfileBaseline,
25 RTCH264ProfileMain,
26 RTCH264ProfileConstrainedHigh,
27 RTCH264ProfileHigh,
28};
29
30typedef NS_ENUM(NSUInteger, RTCH264Level) {
31 RTCH264Level1_b = 0,
32 RTCH264Level1 = 10,
33 RTCH264Level1_1 = 11,
34 RTCH264Level1_2 = 12,
35 RTCH264Level1_3 = 13,
36 RTCH264Level2 = 20,
37 RTCH264Level2_1 = 21,
38 RTCH264Level2_2 = 22,
39 RTCH264Level3 = 30,
40 RTCH264Level3_1 = 31,
41 RTCH264Level3_2 = 32,
42 RTCH264Level4 = 40,
43 RTCH264Level4_1 = 41,
44 RTCH264Level4_2 = 42,
45 RTCH264Level5 = 50,
46 RTCH264Level5_1 = 51,
47 RTCH264Level5_2 = 52
48};
49
Mirko Bonadeie8d57242018-09-17 10:22:56 +020050RTC_OBJC_EXPORT
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020051@interface RTCH264ProfileLevelId : NSObject
52
53@property(nonatomic, readonly) RTCH264Profile profile;
54@property(nonatomic, readonly) RTCH264Level level;
55@property(nonatomic, readonly) NSString *hexString;
56
57- (instancetype)initWithHexString:(NSString *)hexString;
58- (instancetype)initWithProfile:(RTCH264Profile)profile level:(RTCH264Level)level;
59
60@end