RTCH264ProfileLevelId.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. #import <Foundation/Foundation.h>
  11. #import "RTCMacros.h"
  12. RTC_OBJC_EXPORT extern NSString *const kRTCVideoCodecH264Name;
  13. RTC_OBJC_EXPORT extern NSString *const kRTCLevel31ConstrainedHigh;
  14. RTC_OBJC_EXPORT extern NSString *const kRTCLevel31ConstrainedBaseline;
  15. RTC_OBJC_EXPORT extern NSString *const kRTCMaxSupportedH264ProfileLevelConstrainedHigh;
  16. RTC_OBJC_EXPORT extern NSString *const kRTCMaxSupportedH264ProfileLevelConstrainedBaseline;
  17. /** H264 Profiles and levels. */
  18. typedef NS_ENUM(NSUInteger, RTCH264Profile) {
  19. RTCH264ProfileConstrainedBaseline,
  20. RTCH264ProfileBaseline,
  21. RTCH264ProfileMain,
  22. RTCH264ProfileConstrainedHigh,
  23. RTCH264ProfileHigh,
  24. };
  25. typedef NS_ENUM(NSUInteger, RTCH264Level) {
  26. RTCH264Level1_b = 0,
  27. RTCH264Level1 = 10,
  28. RTCH264Level1_1 = 11,
  29. RTCH264Level1_2 = 12,
  30. RTCH264Level1_3 = 13,
  31. RTCH264Level2 = 20,
  32. RTCH264Level2_1 = 21,
  33. RTCH264Level2_2 = 22,
  34. RTCH264Level3 = 30,
  35. RTCH264Level3_1 = 31,
  36. RTCH264Level3_2 = 32,
  37. RTCH264Level4 = 40,
  38. RTCH264Level4_1 = 41,
  39. RTCH264Level4_2 = 42,
  40. RTCH264Level5 = 50,
  41. RTCH264Level5_1 = 51,
  42. RTCH264Level5_2 = 52
  43. };
  44. RTC_OBJC_EXPORT
  45. @interface RTC_OBJC_TYPE (RTCH264ProfileLevelId) : NSObject
  46. @property(nonatomic, readonly) RTCH264Profile profile;
  47. @property(nonatomic, readonly) RTCH264Level level;
  48. @property(nonatomic, readonly) NSString *hexString;
  49. - (instancetype)initWithHexString:(NSString *)hexString;
  50. - (instancetype)initWithProfile:(RTCH264Profile)profile level:(RTCH264Level)level;
  51. @end