kthelgason | fb14312 | 2017-07-25 07:55:58 -0700 | [diff] [blame] | 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 <WebRTC/RTCMacros.h> |
| 14 | #import <WebRTC/RTCVideoCodecFactory.h> |
| 15 | |
Anders Carlsson | 7e04281 | 2017-10-05 16:55:38 +0200 | [diff] [blame] | 16 | /** Class for H264 specific config. */ |
| 17 | typedef NS_ENUM(NSUInteger, RTCH264PacketizationMode) { |
| 18 | RTCH264PacketizationModeNonInterleaved = 0, // Mode 1 - STAP-A, FU-A is allowed |
| 19 | RTCH264PacketizationModeSingleNalUnit // Mode 0 - only single NALU allowed |
| 20 | }; |
| 21 | |
| 22 | RTC_EXPORT |
| 23 | @interface RTCCodecSpecificInfoH264 : NSObject <RTCCodecSpecificInfo> |
| 24 | |
| 25 | @property(nonatomic, assign) RTCH264PacketizationMode packetizationMode; |
| 26 | |
| 27 | @end |
| 28 | |
Anders Carlsson | 79ce820 | 2018-06-01 12:51:09 +0200 | [diff] [blame] | 29 | /** H264 Profiles and levels. */ |
| 30 | typedef NS_ENUM(NSUInteger, RTCH264Profile) { |
| 31 | RTCH264ProfileConstrainedBaseline, |
| 32 | RTCH264ProfileBaseline, |
| 33 | RTCH264ProfileMain, |
| 34 | RTCH264ProfileConstrainedHigh, |
| 35 | RTCH264ProfileHigh, |
| 36 | }; |
| 37 | |
| 38 | typedef NS_ENUM(NSUInteger, RTCH264Level) { |
| 39 | RTCH264Level1_b = 0, |
| 40 | RTCH264Level1 = 10, |
| 41 | RTCH264Level1_1 = 11, |
| 42 | RTCH264Level1_2 = 12, |
| 43 | RTCH264Level1_3 = 13, |
| 44 | RTCH264Level2 = 20, |
| 45 | RTCH264Level2_1 = 21, |
| 46 | RTCH264Level2_2 = 22, |
| 47 | RTCH264Level3 = 30, |
| 48 | RTCH264Level3_1 = 31, |
| 49 | RTCH264Level3_2 = 32, |
| 50 | RTCH264Level4 = 40, |
| 51 | RTCH264Level4_1 = 41, |
| 52 | RTCH264Level4_2 = 42, |
| 53 | RTCH264Level5 = 50, |
| 54 | RTCH264Level5_1 = 51, |
| 55 | RTCH264Level5_2 = 52 |
| 56 | }; |
| 57 | |
| 58 | RTC_EXPORT |
| 59 | @interface RTCH264ProfileLevelId : NSObject |
| 60 | |
| 61 | @property(nonatomic, readonly) RTCH264Profile profile; |
| 62 | @property(nonatomic, readonly) RTCH264Level level; |
| 63 | @property(nonatomic, readonly) NSString *hexString; |
| 64 | |
| 65 | - (instancetype)initWithHexString:(NSString *)hexString; |
| 66 | - (instancetype)initWithProfile:(RTCH264Profile)profile level:(RTCH264Level)level; |
| 67 | |
| 68 | @end |
| 69 | |
kthelgason | fb14312 | 2017-07-25 07:55:58 -0700 | [diff] [blame] | 70 | /** Encoder. */ |
| 71 | RTC_EXPORT |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame^] | 72 | @interface RTCVideoEncoderH264 : NSObject <RTCVideoEncoder> |
magjed | 73c0eb5 | 2017-08-07 06:55:28 -0700 | [diff] [blame] | 73 | |
| 74 | - (instancetype)initWithCodecInfo:(RTCVideoCodecInfo *)codecInfo; |
| 75 | |
kthelgason | fb14312 | 2017-07-25 07:55:58 -0700 | [diff] [blame] | 76 | @end |
| 77 | |
| 78 | /** Decoder. */ |
| 79 | RTC_EXPORT |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame^] | 80 | @interface RTCVideoDecoderH264 : NSObject <RTCVideoDecoder> |
kthelgason | fb14312 | 2017-07-25 07:55:58 -0700 | [diff] [blame] | 81 | @end |
| 82 | |
| 83 | /** Encoder factory. */ |
| 84 | RTC_EXPORT |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame^] | 85 | @interface RTCVideoEncoderFactoryH264 : NSObject <RTCVideoEncoderFactory> |
kthelgason | fb14312 | 2017-07-25 07:55:58 -0700 | [diff] [blame] | 86 | @end |
| 87 | |
| 88 | /** Decoder factory. */ |
| 89 | RTC_EXPORT |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame^] | 90 | @interface RTCVideoDecoderFactoryH264 : NSObject <RTCVideoDecoderFactory> |
kthelgason | fb14312 | 2017-07-25 07:55:58 -0700 | [diff] [blame] | 91 | @end |