RTCH264ProfileLevelId.h 1.9 KB

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