• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
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 
15 RTC_OBJC_EXPORT extern NSString *const kRTCVideoCodecH264Name;
16 RTC_OBJC_EXPORT extern NSString *const kRTCLevel31ConstrainedHigh;
17 RTC_OBJC_EXPORT extern NSString *const kRTCLevel31ConstrainedBaseline;
18 RTC_OBJC_EXPORT extern NSString *const kRTCMaxSupportedH264ProfileLevelConstrainedHigh;
19 RTC_OBJC_EXPORT extern NSString *const kRTCMaxSupportedH264ProfileLevelConstrainedBaseline;
20 
21 /** H264 Profiles and levels. */
22 typedef NS_ENUM(NSUInteger, RTCH264Profile) {
23   RTCH264ProfileConstrainedBaseline,
24   RTCH264ProfileBaseline,
25   RTCH264ProfileMain,
26   RTCH264ProfileConstrainedHigh,
27   RTCH264ProfileHigh,
28 };
29 
30 typedef 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 
50 RTC_OBJC_EXPORT
51 @interface RTC_OBJC_TYPE (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
61