NERTC iOS SDK V5.6.40
载入中...
搜索中...
未找到
NERtcEngineEnum.h
1/*
2 * Copyright (c) 2021 NetEase, Inc. All rights reserved.
3 */
4
5#import <Foundation/Foundation.h>
6
7#if __has_attribute(visibility)
8#define NERTC_EXPORT __attribute__((visibility("default")))
9#endif
10
11#ifndef NERTC_EXPORT
12#define NERTC_EXPORT
13#endif
14
15#if defined(__cplusplus)
16#define NERTC_EXTERN_API extern "C" __attribute__((visibility("default")))
17#else
18#define NERTC_EXTERN_API extern __attribute__((visibility("default")))
19#endif
20
21#if TARGET_OS_IPHONE
22#import <UIKit/UIKit.h>
23typedef UIView VIEW_CLASS;
24typedef UIColor COLOR_CLASS;
25#elif TARGET_OS_MAC
26#import <AppKit/AppKit.h>
27typedef NSView VIEW_CLASS;
28typedef NSColor COLOR_CLASS;
29#endif
30
31
32NS_ASSUME_NONNULL_BEGIN
33
34#pragma mark -- ENGINE ENUM
35
36
45typedef NS_ENUM(NSUInteger, NERtcConnectionStateType) {
57 kNERtcConnectionStateUnknown = 0,
69 kNERtcConnectionStateDisconnected = 1,
79 kNERtcConnectionStateConnecting = 2,
89 kNERtcConnectionStateConnected = 3,
99 kNERtcConnectionStateReconnecting = 4,
109 kNERtcConnectionStateFailed = 5,
110};
111
112
121typedef NS_ENUM(NSInteger, NERtcSessionLeaveReason) {
130 kNERtcSessionLeaveNormal = 0,
139 kNERtcSessionLeaveForFailOver = 1,
148 kNERTCSessionLeaveForUpdate = 2,
157 kNERtcSessionLeaveForKick = 3,
166 kNERtcSessionLeaveTimeout = 4,
167};
168
177typedef NS_ENUM(NSInteger, NERtcJoin3Type) {
186 kNERtcJoin3WithPubVideo = 4,
195 kNERtcJoin3NoPubVideo = 5,
196};
197
206typedef NS_ENUM(NSInteger, NERtcClientRole) {
215 kNERtcClientRoleBroadcaster = 0,
224 kNERtcClientRoleAudience = 1,
225};
226
235typedef NS_ENUM(NSUInteger, NERtcMediaPubType) {
244 kNERtcMediaPubTypeAudio,
245};
246
255typedef NS_ENUM(NSInteger, NERtcReasonConnectionChangedType) {
264 kNERtcReasonConnectionChangedLeaveChannel = 1,
273 kNERtcReasonConnectionChangedChannelClosed = 2,
282 kNERtcReasonConnectionChangedBeKicked = 3,
291 kNERtcReasonConnectionChangedTimeOut = 4,
300 kNERtcReasonConnectionChangedJoinChannel = 5,
309 kNERtcReasonConnectionChangedJoinSucceed = 6,
318 kNERtcReasonConnectionChangedReJoinSucceed = 7,
327 kNERtcReasonConnectionChangedMediaConnectionDisconnected = 8,
336 kNERtcReasonConnectionChangedSignalDisconnected = 9,
345 kNERtcReasonConnectionChangedRequestChannelFailed = 10,
354 kNERtcReasonConnectionChangedJoinChannelFailed = 11,
363 kNERtcReasonConnectionChangedReDispatch = 12,
372 kNERtcReasonConnectionChangedSettingProxyServer = 13,
381 kNERtcReasonConnectionChangedBeKickedDueToSameUserId = 14
382};
383
392typedef NS_ENUM(NSInteger, NERtcFeatureType) {
401 kNERtcFeatureTypeVirtualBackground = 0,
402};
403
404typedef NS_ENUM(NSInteger, NERtcFeatureSupportType) {
413 kNERtcFeatureSupportFull = 0,
414
423 kNERtcFeatureSupportHardwareLimit = 1,
424
433 kNERtcFeatureSupportPerformanceLimit = 2
434};
435
436#pragma mark -- VIDEO ENUM
437
438
447typedef NS_ENUM(NSUInteger, NERtcVideoProfileType) {
456 kNERtcVideoProfileLowest = 0, // 160x90/120
465 kNERtcVideoProfileLow = 1, // 320x180/240
474 kNERtcVideoProfileStandard = 2, // 640x360/480
483 kNERtcVideoProfileHD720P = 3, // 1280x720
492 kNERtcVideoProfileHD1080P = 4, // 1920x1080
501 kNERtcVideoProfileMAX = kNERtcVideoProfileHD1080P,
502};
503
514typedef NS_ENUM(NSUInteger, NERtcVideoFrameRate) {
523 kNERtcVideoFrameRateFpsDefault = 0,
532 kNERtcVideoFrameRateFps7 = 7,
541 kNERtcVideoFrameRateFps10 = 10,
550 kNERtcVideoFrameRateFps15 = 15,
559 kNERtcVideoFrameRateFps24 = 24,
568 kNERtcVideoFrameRateFps30 = 30,
577 kNERtcVideoFrameRateFps60 = 60,
578};
579
600typedef NS_ENUM(NSUInteger, NERtcDegradationPreference) {
613 kNERtcDegradationDefault = 0,
622 kNERtcDegradationMaintainFramerate,
631 kNERtcDegradationMaintainQuality,
640 kNERtcDegradationBalanced,
641};
642
651typedef NS_ENUM(NSUInteger, NERtcSubStreamContentPrefer) {
664 kNERtcSubStreamContentPreferMotion = 0,
677 kNERtcSubStreamContentPreferDetails,
678};
679
688typedef NS_ENUM(NSUInteger, NERtcRemoteVideoStreamType) {
697 kNERtcRemoteVideoStreamTypeHigh,
706 kNERtcRemoteVideoStreamTypeLow
707};
708
717typedef NS_ENUM(NSUInteger, NERtcVideoPubMode) {
726 kNERtcVideoSendOnPubWithNone = 0,
735 kNERtcVideoSendOnPubWithHigh,
744 kNERtcVideoSendOnPubWithLow,
753 kNERtcVideoSendOnPubWithAll,
754};
755
764typedef NS_ENUM(NSUInteger, NERtcVideoRenderScaleMode) {
773 kNERtcVideoRenderScaleFit = 0,
782 kNERtcVideoRenderScaleFullFill = 1,
791 kNERtcVideoRenderScaleCropFill = 2,
792};
793
802typedef NS_ENUM(NSUInteger, NERtcVideoRotationMode) {
811 NERtcVideoRotationModeBySystem = 0,
820 NERtcVideoRotationModeByApp = 1,
821};
822
823
832typedef NS_ENUM(NSUInteger, NERtcVideoMirrorMode) {
841 kNERtcVideoMirrorModeAuto = 0,
850 kNERtcVideoMirrorModeEnabled = 1,
859 kNERtcVideoMirrorModeDisabled = 2,
860};
861
870typedef NS_ENUM(NSUInteger, NERtcVideoOutputOrientationMode) {
885 kNERtcVideoOutputOrientationModeAdaptative = 0,
896 kNERtcVideoOutputOrientationModeFixedLandscape = 1,
907 kNERtcVideoOutputOrientationModeFixedPortrait = 2,
908};
909
918typedef NS_ENUM(NSUInteger, NERtcVideoCropMode) {
927 kNERtcVideoCropDefault,
936 kNERtcVideoCropMode16_9,
945 kNERtcVideoCropMode4_3,
954 kNERtcVideoCropMode1_1,
955};
956
965typedef NS_ENUM(NSUInteger, NERtcRenderType) {
974 kNERtcRenderDefault = 0,
983 kNERtcRenderOpenGL,
992 kNERtcRenderMetal,
993};
994
1003typedef NS_ENUM(NSUInteger, NERtcVideoRotationType) {
1012 kNERtcVideoRotation_0 = 0,
1021 kNERtcVideoRotation_90 = 90,
1030 kNERtcVideoRotation_180 = 180,
1039 kNERtcVideoRotation_270 = 270,
1040};
1041
1042typedef NS_ENUM(NSUInteger, NERtcVideoBufferType) {
1043 // 原始数据
1044 NERtcVideoBufferTypeRawData = 0,
1045 // Metal 纹理
1046 NERtcVideoBufferTypeMetalTexture
1047};
1048
1057typedef NS_ENUM(NSUInteger, NERtcVideoFormatType) {
1066 kNERtcVideoFormatI420 = 0,
1075 kNERtcVideoFormatNV12,
1084 kNERtcVideoFormatBGRA,
1085};
1086
1095typedef NS_ENUM(NSUInteger, NERtcStreamChannelType) {
1104 kNERtcStreamChannelTypeMainStream = 0,
1113 kNERtcStreamChannelTypeSubStream,
1122 kNERtcStreamChannelTypeThirdStream,
1131 kNERtcStreamChannelTypeFourthStream,
1132};
1133
1144typedef NS_ENUM(NSUInteger, NERtcVirtualBackgroundSourceStateReason) {
1153 kNERtcVirtualBackgroundSourceStateReasonSuccess = 0,
1162 kNERtcVirtualBackgroundSourceStateReasonImageNotExist = 1,
1171 kNERtcVirtualBackgroundSourceStateReasonImageFormatNotSupported = 2,
1180 kNERtcVirtualBackgroundSourceStateReasonColorFormatNotSupported = 3,
1189 kNERtcVirtualBackgroundSourceStateReasonDeviceNotSupported = 4
1190};
1191
1202typedef NS_ENUM(NSUInteger, NERtcVirtualBackgroundSourceType ) {
1203
1212 kNERtcVirtualBackgroundColor = 1,
1213
1222 kNERtcVirtualBackgroundImg = 2,
1223
1232 kNERtcVirtualBackgroundBlur = 3,
1233};
1234
1245typedef NS_ENUM(NSUInteger, NERtcBlurDegree ) {
1246
1255 kNERtcBlurLow = 1,
1256
1265 kNERtcBlurMedium = 2,
1266
1275 kNERtcBlurHigh = 3,
1276};
1277
1286typedef NS_ENUM(NSUInteger, NERtcVideoWatermarkType) {
1295 kNERtcVideoWatermarkTypeImage = 0,
1296
1305 kNERtcVideoWatermarkTypeText,
1306
1315 kNERtcVideoWatermarkTypeTimeStamp
1316};
1317
1326typedef NS_ENUM(NSUInteger, NERtcLocalVideoWatermarkState) {
1335 kNERtcLocalVideoWatermarkStateSetSuccess = 0,
1336
1345 kNERtcLocalVideoWatermarkStateDeviceNotSupported = 1,
1346
1355 kNERtcLocalVideoWatermarkStateImageFormatNotSupported,
1356
1365 kNERtcLocalVideoWatermarkStateImageNumberError,
1366
1375 kNERtcLocalVideoWatermarkStateImageSizeError,
1376
1385 kNERtcLocalVideoWatermarkStateImageFpsError,
1386
1395 kNERtcLocalVideoWatermarkStateFontError,
1396
1402 kNERtcLocalVideoWatermarkStateAlphaError,
1403
1409 kNERtcLocalVideoWatermarkStateTextContentEmpty,
1410
1419 kNERtcLocalVideoWatermarkStateCancel = 20
1420};
1421
1430typedef NS_ENUM(NSUInteger, NERtcCameraPosition) {
1439 kNERtcCameraPositionBack = 0,
1440
1449 kNERtcCameraPositionFront
1450};
1451
1452#pragma mark -- AUDIO ENUM
1453
1462typedef NS_ENUM(NSInteger, NERtcAudioOutputRouting) {
1471 kNERtcAudioOutputRoutingDefault = 0,
1480 kNERtcAudioOutputRoutingHeadset,
1489 kNERtcAudioOutputRoutingEarpiece,
1498 kNERtcAudioOutputRoutingLoudspeaker,
1507 kNERtcAudioOutputRoutingBluetooth,
1508};
1509
1520typedef NS_ENUM(NSInteger, NERtcAudioProfileType) {
1529 kNERtcAudioProfileDefault = 0,
1538 kNERtcAudioProfileStandard,
1547 kNERtcAudioProfileStandardExtend,
1556 kNERtcAudioProfileMiddleQuality,
1565 kNERtcAudioProfileMiddleQualityStereo,
1574 kNERtcAudioProfileHighQuality,
1583 kNERtcAudioProfileHighQualityStereo,
1584};
1585
1604typedef NS_ENUM(NSInteger, NERtcAudioScenarioType) {
1613 kNERtcAudioScenarioDefault = 0,
1622 kNERtcAudioScenarioSpeech,
1631 kNERtcAudioScenarioMusic,
1640 kNERtcAudioScenarioChatRoom,
1641};
1642
1651typedef NS_ENUM(NSInteger, NERtcChannelProfileType) {
1660 kNERtcChannelProfileCommunication = 0,
1669 kNERtcChannelProfileLiveBroadcasting = 1,
1670
1681 kNERtcChannelProfileVideoCall = 3,
1682
1693 kNERtcChannelProfileHighQualityVideoCall = 4,
1694
1705 kNERtcChannelProfileChatroom = 5,
1706
1717 kNERtcChannelProfileHighQualityChatroom = 6,
1718
1729 kNERtcChannelProfileMeeting = 7,
1730
1741 kNERtcChannelProfileKaraoke = 8,
1742};
1743
1744
1755typedef NS_ENUM(NSInteger, NERtcAudioSessionOperationRestriction) {
1764 kNERtcAudioSessionOperationRestrictionNone = 0,
1773 kNERtcAudioSessionOperationRestrictionAll,
1782 kNERtcAudioSessionOperationRestrictionDeactivateSession,
1783};
1784
1788typedef NS_ENUM(int, NERtcAudioStreamType) {
1790 kNERtcAudioStreamMain = 0,
1792 kNERtcAudioStreamSub,
1794 kNERtcAudioStreamTypeMain = kNERtcAudioStreamMain,
1796 kNERtcAudioStreamTypeSub = kNERtcAudioStreamSub
1797};
1798
1802typedef NS_ENUM(NSInteger, NERtcAudioDumpType) {
1804 kNERtcAudioDumpTypePCM = 0,
1806 kNERtcAudioDumpTypeAll,
1808 kNERtcAudioDumpTypeWAV
1809};
1810
1814typedef NS_ENUM(NSInteger, NERtcSpatializerRoomCapacity) {
1818 kNERtcSpatializerRoomCapacitySmall = 0,
1819
1823 kNERtcSpatializerRoomCapacityMedium = 1,
1824
1828 kNERtcSpatializerRoomCapacityLarge = 2,
1829
1833 kNERtcSpatializerRoomCapacityHuge = 3,
1834
1838 kNERtcSpatializerRoomCapacityNone = 4
1839};
1840
1844typedef NS_ENUM(NSInteger, NERtcSpatializerMaterialName) {
1848 kNERtcSpatializerMaterialTransparent = 0,
1852 kNERtcSpatializerMaterialAcousticCeilingTiles,
1856 kNERtcSpatializerMaterialBrickBare,
1860 kNERtcSpatializerMaterialBrickPainted,
1864 kNERtcSpatializerMaterialConcreteBlockCoarse,
1868 kNERtcSpatializerMaterialConcreteBlockPainted,
1872 kNERtcSpatializerMaterialCurtainHeavy,
1876 kNERtcSpatializerMaterialFiberGlassInsulation,
1880 kNERtcSpatializerMaterialGlassThin,
1884 kNERtcSpatializerMaterialGlassThick,
1888 kNERtcSpatializerMaterialGrass,
1892 kNERtcSpatializerMaterialLinoleumOnConcrete,
1896 kNERtcSpatializerMaterialMarble,
1900 kNERtcSpatializerMaterialMetal,
1904 kNERtcSpatializerMaterialParquetOnConcrete,
1908 kNERtcSpatializerMaterialPlasterRough,
1912 kNERtcSpatializerMaterialPlasterSmooth,
1916 kNERtcSpatializerMaterialPlywoodPanel,
1920 kNERtcSpatializerMaterialPolishedConcreteOrTile,
1924 kNERtcSpatializerMaterialSheetrock,
1928 kNERtcSpatializerMaterialWaterOrIceSurface,
1932 kNERtcSpatializerMaterialWoodCeiling,
1936 kNERtcSpatializerMaterialWoodPanel,
1940 kNERtcSpatializerMaterialUniform
1941};
1942
1946typedef NS_ENUM(NSInteger, NERtcSpatializerRenderMode) {
1950 kNERtcSpatializerRenderStereoPanning = 0,
1954 kNERtcSpatializerRenderBinauralLowQuality,
1958 kNERtcSpatializerRenderBinauralMediumQuality,
1962 kNERtcSpatializerRenderBinauralHighQuality,
1966 kNERtcSpatializerRenderRoomEffectsOnly
1967};
1968
1972typedef NS_ENUM(NSInteger, NERtcDistanceRolloffModel) {
1976 kNERtcDistanceRolloffLogarithmic = 0,
1980 kNERtcDistanceRolloffLinear,
1984 kNERtcDistanceRolloffNone,
1988 kNERtcDistanceRolloffLinearOnly
1989};
1990
1991typedef NS_ENUM(NSInteger, NERtcRangeAudioMode) {
2000 NERtcRangeAudioModeDefault = 0,
2007 NERtcRangeAudioModeTeam = 1,
2008};
2009
2010#pragma mark - media
2011
2012typedef NS_ENUM(NSInteger, NERtcMediaPriorityType){
2021 kNERtcMediaPriorityHigh = 50,
2030 kNERtcMediaPriorityNormal = 100,
2031};
2032
2033typedef NS_ENUM(NSInteger, NERtcStreamFallbackOptions){
2044 kNERtcStreamFallbackOptionDisabled = 0,
2055 kNERtcStreamFallbackOptionVideoStreamLow = 1,
2066 kNERtcStreamFallbackOptionAudioOnly = 2,
2067};
2068
2077typedef NS_ENUM(NSInteger, NERtcAudioRecordingQuality) {
2086 kNERtcAudioRecordingQualityLow = 0,
2095 kNERtcAudioRecordingQualityMedium = 1,
2104 kNERtcAudioRecordingQualityHigh = 2,
2105};
2106
2115typedef NS_ENUM(NSInteger, NERtcAudioRecordingCode) {
2124 NERtcAudioRecordingCodeErrorSuffix = 1,
2137 kNERtcAudioRecordingOpenFileFailed = 2,
2146 kNERtcAudioRecordingCodeStart = 3,
2155 kNERtcAudioRecordingRecordError = 4,
2164 kNERtcAudioRecordingCodeFinish = 5,
2165};
2166
2167typedef NS_ENUM(NSInteger, NERtcAudioRecordingPosition) {
2168 // 录制本地和所有远端用户混音后的音频(默认)
2169 kNERtcAudioRecordingPositionMixedRecordingAndPlayback = 0,
2170 // 仅录制采集的音频
2171 kNERtcAudioRecordingPositionRecording = 1,
2172 // 仅录制播放的音频
2173 kNERtcAudioRecordingPositionMixedPlayback = 2
2174};
2175
2176typedef NS_ENUM(NSInteger, NERtcAudioRecordingCycleTime) {
2177 // 音频录制缓存时间为 0,实时写文件(默认)
2178 kNERtcAudioRecordingCycleTime0 = 0,
2179 // 音频录制缓存时间为 10s,StopAudioRectording()后,将缓存都写到文件,文件数据时间跨度为: [0,10s]
2180 kNERtcAudioRecordingCycleTime10 = 10,
2181 // 音频录制缓存时间为 60s,StopAudioRectording()后,将缓存都写到文件,文件数据时间跨度为: [0,60s]
2182 kNERtcAudioRecordingCycleTime60 = 60,
2183 // 音频录制缓存时间为 360s,StopAudioRectording()后,将缓存都写到文件,文件数据时间跨度为: [0,360s]
2184 kNERtcAudioRecordingCycleTime360 = 360,
2185 // 音频录制缓存时间为 900s,StopAudioRectording()后,将缓存都写到文件,文件数据时间跨度为: [0,900s]
2186 kNERtcAudioRecordingCycleTime900 = 900
2187};
2188
2197typedef NS_ENUM(int, NERtcPreDecoderMediaType) {
2206 kNERtcPreDecoderMediaTypeAudio = 0,
2207
2216 kNERtcPreDecoderMediaTypeVideo = 1,
2217
2226 kNERtcPreDecoderMediaTypeUnknown = 100,
2227};
2228
2229typedef NS_ENUM(int, NERtcVideoCodecType) {
2230 kNERtcVideoCodecTypeH264 = 3,
2231};
2232
2233#pragma mark --Voice changer/beautifier
2234
2243typedef NS_ENUM(NSInteger, NERtcAudioEqualizationBandFrequency ) {
2252 NERtcAudioEqualizationBand31 = 0,
2261 NERtcAudioEqualizationBand62 = 1,
2270 NERtcAudioEqualizationBand125 = 2,
2279 NERtcAudioEqualizationBand250 = 3,
2288 NERtcAudioEqualizationBand500 = 4,
2297 NERtcAudioEqualizationBand1K = 5,
2306 NERtcAudioEqualizationBand2K = 6,
2315 NERtcAudioEqualizationBand4K = 7,
2324 NERtcAudioEqualizationBand8K = 8,
2333 NERtcAudioEqualizationBand16K = 9,
2334};
2335
2344typedef NS_ENUM(NSInteger, NERtcVoiceChangerType) {
2353 kNERtcVoiceChangerOff = 0,
2362 kNERtcVoiceChangerRobot,
2371 kNERtcVoiceChangerGaint,
2380 kNERtcVoiceChangerHorror,
2389 kNERtcVoiceChangerMature,
2398 kNERtcVoiceChangerManToWoman,
2407 kNERtcVoiceChangerWomanToMan,
2416 kNERtcVoiceChangerManToLoli,
2425 kNERtcVoiceChangerWomanToLoli
2426};
2427
2436typedef NS_ENUM(NSInteger, NERtcVoiceBeautifierType) {
2445 kNERtcVoiceBeautifierOff = 0,
2454 kNERtcVoiceBeautifierMuffled,
2463 kNERtcVoiceBeautifierMellow,
2472 kNERtcVoiceBeautifierClear,
2481 kNERtcVoiceBeautifierMagnetic,
2490 kNERtcVoiceBeautifierRecordingStudio,
2499 kNERtcVoiceBeautifierNature,
2508 kNERtcVoiceBeautifierKTV,
2517 kNERtcVoiceBeautifierRemote,
2526 kNERtcVoiceBeautifierChurch,
2535 kNERtcVoiceBeautifierBedroom,
2544 kNERtcVoiceBeautifierLive
2545};
2546
2547#pragma mark -- RECORD ENUM
2548
2557typedef NS_ENUM(NSUInteger, NERtcRecordType) {
2566 kNERtcRecordTypeAll = 0,
2575 kNERtcRecordTypeMix = 1,
2584 kNERtcRecordTypeSingle = 2,
2585};
2586
2587#pragma mark - AUDIO MIXING ENUM
2588
2597typedef NS_ENUM(NSUInteger, NERtcAudioMixingState) {
2606 kNERtcAudioMixingStateFinished = 0,
2615 kNERtcAudioMixingStateFailed,
2616};
2617
2626typedef NS_ENUM(NSUInteger, NERtcAudioMixingErrorCode) {
2635 kNERtcAudioMixingErrorOK = 0 ,
2644 kNERtcAudioMixingErrorFatal ,
2653 kNERtcAudioMixingErrorCanNotOpen ,
2662 kNERtcAudioMixingErrorDecode ,
2671 kNERtcAudioMixingErrorInterrupt ,
2680 kNERtcAudioMixingErrorHttpNotFound ,
2689 kNERtcAudioMixingErrorOpen ,
2698 kNERtcAudioMixingErrorNInfo ,
2707 kNERtcAudioMixingErrorNStream ,
2716 kNERtcAudioMixingErrorNCodec ,
2725 kNERtcAudioMixingErrorNMem ,
2734 kNERtcAudioMixingErrorCodecOpen ,
2743 kNERtcAudioMixingErrorInvalidInfo ,
2752 kNERtcAudioMixingErrorOpenTimeout ,
2761 kNERtcAudioMixingErrorIoTimeout ,
2770 kNERtcAudioMixingErrorIo ,
2771};
2772
2773
2774#pragma mark -- Network Status ENUM
2783typedef NS_ENUM(NSInteger, NERtcNetworkConnectionType) {
2792 kNERtcNetworkConnectionTypeNone,
2801 kNERtcNetworkConnectionTypeUnknown,
2810 kNERtcNetworkConnectionType2G,
2819 kNERtcNetworkConnectionType3G,
2828 kNERtcNetworkConnectionType4G,
2837 kNERtcNetworkConnectionType5G,
2846 kNERtcNetworkConnectionTypeWiFi,
2855 kNERtcNetworkConnectionTypeWWAN,
2856};
2857
2858
2859#pragma mark -- Live Stream
2868typedef NS_ENUM(NSInteger, NERtcLiveStreamAudioSampleRate) {
2877 kNERtcLiveStreamAudioSampleRate32000 = 32000,
2886 kNERtcLiveStreamAudioSampleRate44100 = 44100,
2895 kNERtcLiveStreamAudioSampleRate48000 = 48000,
2896};
2897
2906typedef NS_ENUM(NSInteger, NERtcLiveStreamAudioCodecProfile) {
2915 kNERtcLiveStreamAudioCodecProfileLCAAC = 0,
2924 kNERtcLiveStreamAudioCodecProfileHEAAC = 1,
2925};
2926
2935typedef NS_ENUM(NSInteger, NERtcLiveStreamMode) {
2944 kNERtcLsModeVideo = 0,
2953 kNERtcLsModeAudio,
2954};
2955
2964typedef NS_ENUM(NSInteger, NERtcLiveStreamVideoScaleMode) {
2973 kNERtcLsModeVideoScaleFit = 0,
2982 kNERtcLsModeVideoScaleCropFill ,
2983};
2984
2993typedef NS_ENUM(NSInteger, NERtcLiveStreamStateCode) {
3002 kNERtcLsStatePushing = 505,
3011 kNERtcLsStatePushFail = 506,
3020 kNERtcLsStatePushStopped = 511,
3021};
3022
3023#pragma mark -- Audio Frame Observer
3034typedef NS_ENUM(NSInteger, NERtcAudioType) {
3043 kNERtcAudioTypePCM16 = 0 ,
3044};
3045
3054typedef NS_ENUM(NSInteger, NERtcAudioFrameOpMode) {
3063 kNERtcAudioFrameOpModeReadOnly = 0 ,
3072 kNERtcAudioFrameOpModeReadWrite = 1 ,
3073};
3074
3075#pragma mark -- Device type
3084typedef NS_ENUM(int, NERtcAudioDeviceType) {
3093 kNERtcAudioDeviceTypeUnknown = 0,
3102 kNERtcAudioDeviceTypeRecord,
3111 kNERtcAudioDeviceTypePlayout,
3112};
3113
3122typedef NS_ENUM(int, NERtcVideoDeviceType) {
3131 kNERtcVideoDeviceTypeUnknown = 0,
3140 kNERtcVideoDeviceTypeCapture,
3141};
3142
3143#pragma mark -- Device state
3152typedef NS_ENUM(int, NERtcAudioDeviceState) {
3161 kNERtcAudioDeviceStateInitialized = 0,
3170 kNERtcAudioDeviceStateStarted,
3179 kNERtcAudioDeviceStateStoped,
3188 kNERtcAudioDeviceStateUnInitialized,
3189};
3190
3199typedef NS_ENUM(int, NERtcVideoDeviceState) {
3208 kNERtcVideoDeviceStateInitialized = 0,
3217 kNERtcVideoDeviceStateStarted,
3226 kNERtcVideoDeviceStateStoped,
3235 kNERtcVideoDeviceStateUnInitialized,
3236};
3237
3238
3247typedef NS_ENUM(int, NERtcNetworkQuality) {
3256 kNERtcNetworkQualityUnknown = 0,
3265 kNERtcNetworkQualityExcellent,
3274 kNERtcNetworkQualityGood,
3283 kNERtcNetworkQualityPoor,
3292 kNERtcNetworkQualityBad,
3301 kNERtcNetworkQualityVeryBad,
3310 kNERtcNetworkQualityDown,
3311};
3312
3321typedef NS_ENUM(NSUInteger, NERtcChannelMediaRelayState) {
3330 NERtcChannelMediaRelayStateIdle = 0,
3339 NERtcChannelMediaRelayStateConnecting = 1,
3348 NERtcChannelMediaRelayStateRunning = 2,
3357 NERtcChannelMediaRelayStateFailure = 3,
3358};
3359
3368typedef NS_ENUM(NSUInteger, NERtcChannelMediaRelayEvent) {
3377 NERtcChannelMediaRelayEventDisconnect = 0,
3386 NERtcChannelMediaRelayEventConnecting = 1,
3395 NERtcChannelMediaRelayEventConnected = 2,
3404 NERtcChannelMediaRelayEventVideoSentToDestChannelSuccess = 3,
3413 NERtcChannelMediaRelayEventAudioSentToDestChannelSuccess = 4,
3422 NERtcChannelMediaRelayEventOtherStreamSentToDestChannelSuccess = 5,
3439 NERtcChannelMediaRelayEventFailure = 100,
3440};
3441
3450typedef NS_ENUM(NSUInteger, NERtcEncryptionMode) {
3459 NERtcEncryptionModeGMCryptoSM4ECB,
3460
3469 NERtcEncryptionModeCustom,
3470};
3471
3472#pragma mark - last mile probe test
3481typedef NS_ENUM(NSUInteger, NERtcLastmileProbeResultState) {
3490 kNERtcLastmileProbeResultComplete = 1,
3499 kNERtcLastmileProbeResultIncompleteNoBwe = 2,
3508 kNERtcLastmileProbeResultUnavailable = 3,
3509};
3510
3511#pragma mark - Cloud Proxy
3512
3521typedef NS_ENUM(NSUInteger, NERtcTransportType) {
3530 NERtcTransportTypeNoneProxy = 0,
3539 NERtcTransportTypeUDPProxy
3540};
3541
3542#pragma mark -- decoder & encoder
3543
3544typedef NS_ENUM(NSInteger, NERtcNalFrameType) {
3548 kNERtcNalFrameTypeIDR = 1,
3549
3553 kNERtcNalFrameTypeI = 2,
3554
3558 kNERtcNalFrameTypeP = 3,
3559};
3560
3561typedef NS_ENUM(int, NERtcPayLoadType) {
3562 kNERtcPayLoadTypeOPUS = 111,
3563};
3564
3565#pragma mark -- Log
3574typedef NS_ENUM(NSInteger, NERtcLogLevel) {
3583 kNERtcLogLevelFatal = 0,
3592 kNERtcLogLevelError = 1,
3601 kNERtcLogLevelWarning = 2,
3610 kNERtcLogLevelInfo = 3,
3619 kNERtcLogLevelDetailInfo = 4,
3628 kNERtcLogLevelDebug = 5,
3637 kNERtcLogLevelVerbose = 6,
3646 kNERtcLogLevelOff = 7,
3647};
3648
3649#pragma mark - area
3650
3651typedef NS_ENUM(int, NERtcAreaCodeType) {
3655 kNERtcAreaCodeTypeDefault = 0x00,
3659 kNERtcAreaCodeTypeCN = 0x01,
3663 kNERtcAreaCodeTypeOverseaDefault = 0x02,
3664
3665};
3666
3667NS_ASSUME_NONNULL_END
3668