NERtc iOS SDK V5.6.10
载入中...
搜索中...
未找到
INERtcEngineEx.h
浏览该文件的文档.
1/*
2 * Copyright (c) 2021 NetEase, Inc. All rights reserved.
3 */
4
5#ifndef INERtcEngineEx_h
6#define INERtcEngineEx_h
7
8#import "INERtcEngine.h"
10#import "NERtcEngineBase.h"
12
13@class NERtcChannel;
14
15#pragma clang diagnostic push
16#pragma clang diagnostic ignored "-Wdocumentation"
17
18
19NS_ASSUME_NONNULL_BEGIN
20
29@protocol INERtcEngineEx <INERtcEngine>
30
77- (int)enableDualStreamMode:(BOOL)enable;
78
128- (int)setLocalMediaPriority:(NERtcMediaPriorityType)priority preemptive:(BOOL)preemptive;
129
130
155- (int)setLocalPublishFallbackOption:(NERtcStreamFallbackOptions)option;
156
181- (int)setRemoteSubscribeFallbackOption:(NERtcStreamFallbackOptions)option;
182
232- (int)muteLocalAudio:(BOOL)muted;
233
289- (int)subscribeRemoteAudio:(BOOL)subscribe forUserID:(uint64_t)userID;
290
338- (int)subscribeAllRemoteAudio:(BOOL)subscribe;
339
368- (int)setAudioSubscribeOnlyBy:(NSArray<NSNumber*> *)uidArray;
369
394- (int)enableLocalSubStreamAudio:(BOOL)enabled;
395
451- (int)subscribeRemoteSubStreamAudio:(BOOL)subscribe forUserID:(uint64_t)userID;
452
477- (int)muteLocalSubStreamAudio:(BOOL)muted;
478
479
591- (int)setExternalSubStreamAudioSource:(BOOL)enabled sampleRate:(int32_t)sampleRate channels:(int32_t)channels;
592
621- (int)pushExternalSubStreamAudioFrame:(NERtcAudioFrame *)frame;
622
684 - (int)subscribeRemoteVideo:(BOOL)subscribe forUserID:(uint64_t)userID streamType:(NERtcRemoteVideoStreamType)streamType;
685
728- (int)startPreview;
729
780- (int)startPreview:(NERtcStreamChannelType)streamType;
781
812- (int)stopPreview;
813
851- (int)stopPreview:(NERtcStreamChannelType)streamType;
852
894- (int)setLocalRenderScaleMode:(NERtcVideoRenderScaleMode)mode;
895
945- (int)setRemoteRenderScaleMode:(NERtcVideoRenderScaleMode)mode forUserID:(uint64_t)userID;
946
971 - (int)setVideoRotationMode:(NERtcVideoRotationMode)rotationMode;
972
1024 - (int)muteLocalVideo:(BOOL)muted;
1025
1076 - (int)muteLocalVideo:(BOOL)muted streamType:(NERtcStreamChannelType)streamType;
1077
1126- (int)setLoudspeakerMode:(bool)enable;
1127
1142- (int)getLoudspeakerMode:(bool *)enabled;
1143
1144
1157- (int)startAudioDump;
1158
1173- (int)startAudioDumpWithType:(NERtcAudioDumpType)type;
1174
1197- (int)stopAudioDump;
1198
1233- (int)setRemoteHighPriorityAudioStream:(BOOL)enable forUserID:(uint64_t)userID streamType:(NERtcAudioStreamType)streamType;
1234
1249- (int)switchCameraWithPosition:(NERtcCameraPosition)position;
1250
1251
1290- (int)updatePermissionKey:(NSString *)key;
1291
1340- (BOOL)isFeatureSupportedWithType:(NERtcFeatureType)featureType;
1341
1342#pragma mark - External Video Input
1343
1407- (int)setExternalVideoSource:(BOOL)enable isScreen:(BOOL)isScreen;
1408
1477- (int)setExternalVideoSource:(BOOL)enable streamType:(NERtcStreamChannelType)streamType;
1478
1503- (int)pushExternalVideoFrame:(NERtcVideoFrame*)frame;
1504
1520- (int)pushExternalVideoFrame:(NERtcVideoFrame*)frame streamType:(NERtcStreamChannelType)streamType;
1521
1522#pragma mark - Sub Stream
1523
1571- (int)setupLocalSubStreamVideoCanvas:(nullable NERtcVideoCanvas *)canvas;
1572
1622- (int)startScreenCapture:(NERtcVideoSubStreamEncodeConfiguration *)config;
1623
1651- (int)stopScreenCapture;
1652
1698- (int)setLocalRenderSubStreamScaleMode:(NERtcVideoRenderScaleMode)mode;
1699
1763- (int)setupRemoteSubStreamVideoCanvas:(nullable NERtcVideoCanvas *)canvas forUserID:(uint64_t)userID;
1764
1818- (int)subscribeRemoteSubStreamVideo:(BOOL)subscribe forUserID:(uint64_t)userID;
1819
1870- (int)setRemoteRenderSubStreamVideoScaleMode:(NERtcVideoRenderScaleMode)mode forUserID:(uint64_t)userID;
1871
1872#pragma mark - Audio Session
1873
1894- (int)setAudioSessionOperationRestriction:(NERtcAudioSessionOperationRestriction)restriction;
1895
1896#pragma mark - Audio Device Manager
1897
1938- (int)setPlayoutDeviceMute:(bool)muted;
1939
1940
1953- (int)getPlayoutDeviceMute:(bool *)muted;
1954
1955
2001- (int)setRecordDeviceMute:(bool)muted;
2002
2003
2016- (int)getRecordDeviceMute:(bool *)muted;
2017
2018
2019#pragma mark - Camera & Torch Settings
2020
2035- (BOOL)isCameraZoomSupported;
2036
2055- (BOOL)isCameraTorchSupported;
2056
2073- (BOOL)isCameraFocusSupported;
2074
2091- (BOOL)isCameraExposurePositionSupported;
2092
2141- (int)setCameraExposurePosition:(CGPoint)positionInView;
2142
2161- (int)setCameraTorchOn:(BOOL)on;
2162
2175- (BOOL)isCameraTorchOn;
2176
2223- (int)setCameraZoomFactor:(float)factor;
2224
2241 - (float)maxCameraZoomScale;
2242
2296- (int)setCameraFocusPositionX:(float)focusX Y:(float)focusY;
2297
2353 - (int)setCameraCaptureConfig:(NERtcCameraCaptureConfiguration *)config;
2354
2404- (int)setCameraCaptureConfig:(NERtcCameraCaptureConfiguration *)config streamType:(NERtcStreamChannelType)streamType;
2405
2406#pragma mark - Audio Mixing
2407
2467- (int)startAudioMixingWithOption:(NERtcCreateAudioMixingOption *)option;
2468
2492- (int)stopAudioMixing;
2493
2520- (int)pauseAudioMixing;
2521
2547- (int)resumeAudioMixing;
2548
2561- (int)setAudioMixingSendVolume:(uint32_t)volume;
2562
2577- (int)getAudioMixingSendVolume:(uint32_t *)volume;
2578
2593- (int)setAudioMixingPlaybackVolume:(uint32_t)volume;
2594
2609- (int)getAudioMixingPlaybackVolume:(uint32_t *)volume;
2610
2625- (int)getAudioMixingDuration:(uint64_t *)duration;
2626
2641- (int)getAudioMixingCurrentPosition:(uint64_t *)position;
2642
2657- (int)setAudioMixingPosition:(uint64_t)position;
2658
2700- (int)setAudioMixingPitch:(int32_t)pitch;
2701
2722- (int)getAudioMixingPitch:(int32_t *)pitch;
2723
2724#pragma mark - Audio Effect
2791- (int)playEffectWitdId:(uint32_t)effectId effectOption:(NERtcCreateAudioEffectOption *)option;
2792
2832- (int)stopEffectWitdId:(uint32_t)effectId;
2833
2860- (int)stopAllEffects;
2861
2876- (int)pauseEffectWitdId:(uint32_t)effectId;
2877
2892- (int)resumeEffectWitdId:(uint32_t)effectId;
2893
2906- (int)pauseAllEffects;
2907
2920- (int)resumeAllEffects;
2921
2938- (int)setEffectSendVolumeWithId:(uint32_t)effectId volume:(uint32_t)volume;
2939
2956- (int)getEffectSendVolumeWithId:(uint32_t)effectId volume:(uint32_t *)volume;
2957
2974- (int)setEffectPlaybackVolumeWithId:(uint32_t)effectId volume:(uint32_t)volume;
2975
2990- (int)getEffectPlaybackVolumeWithId:(uint32_t)effectId volume:(uint32_t *)volume;
2991
3012- (int)getEffectDurationWithId:(uint32_t)effectId duration:(uint64_t *)duration;
3013
3034- (int)getEffectCurrentPositionWithId:(uint32_t)effectId position:(uint64_t *)position;
3035
3076- (int)setEffectPositionWithId:(uint32_t)effectId position:(uint64_t)position;
3077
3124- (int)setEffectPitchWithId:(uint32_t)effectId pitch:(int32_t)pitch;
3125
3162- (int)getEffectPitchWithId:(uint32_t)effectId pitch:(int32_t *)pitch;
3163
3164#pragma mark - In-ear monitoring
3216- (int)enableEarback:(BOOL)enabled volume:(uint32_t)volume;
3217
3230- (int)setEarbackVolume:(uint32_t)volume;
3231
3232#pragma mark - Audio Recording
3297- (int)startAudioRecording:(NSString *)filePath sampleRate:(int)sampleRate quality:(NERtcAudioRecordingQuality)quality;
3298
3344- (int)startAudioRecordingWithConfig:(NERtcAudioRecordingConfiguration *_Nonnull)config;
3345
3373- (int)stopAudioRecording;
3374
3375#pragma mark - External Audio
3442- (int)setExternalAudioSource:(BOOL)enabled sampleRate:(int32_t)sampleRate channels:(int32_t)channels;
3443
3469- (int)pushExternalAudioFrame:(NERtcAudioFrame *)frame;
3470
3471
3535 - (int)setExternalAudioRender:(BOOL)enabled sampleRate:(int32_t)sampleRate channels:(int32_t)channels;
3536
3562- (int)pullExternalAudioFrame:(void *_Nonnull)data length:(int)len;
3563
3564#pragma mark - 3D Audio
3565
3579- (int)setRangeAudioMode:(NERtcRangeAudioMode)mode;
3580
3596-(int)setRangeAudioTeamID:(int32_t)teamId;
3597
3616- (int)setAudioRecvRange:(int)audibleDistance conversationalDistance:(int)conversationalDistance rollOff:(NERtcDistanceRolloffModel)rollOff;
3617
3654- (int)updateSelfPosition:(NERtcPositionInfo *)info;
3655
3668- (int)enableSpatializerRoomEffects:(BOOL)enabled;
3669
3682- (int)setSpatializerRoomProperty:(NERtcSpatializerRoomProperty *)roomProperty;
3683
3696- (int)setSpatializerRenderMode:(NERtcSpatializerRenderMode)mode;
3697
3707- (int)initSpatializer;
3708
3725- (int)enableSpatializer:(BOOL)enabled applyToTeam:(BOOL)applyToTeam;
3726
3727#pragma mark - ASL black and white list
3743- (int)setSubscribeAudioBlocklist:(NERtcAudioStreamType)type uidArray:(NSArray<NSNumber*> *)uidArray;
3744
3759- (int)setSubscribeAudioAllowlist:(NSArray<NSNumber*> *)uidArray;
3760
3761#pragma mark - Data Channel
3762
3791- (int)enableLocalData:(BOOL)enabled;
3792
3821- (int)subscribeRemoteData:(BOOL)subscribe forUserID:(uint64_t)userID;
3822
3841- (int)sendData:(NSData *)data;
3842
3843#pragma mark - Media Statistic Observer
3844
3857- (int)addEngineMediaStatsObserver:(id<NERtcEngineMediaStatsObserver>)observer;
3858
3871- (int)removeEngineMediaStatsObserver:(id<NERtcEngineMediaStatsObserver>)observer;
3872
3883- (int)cleanupEngineMediaStatsObserver;
3884
3885
3886#pragma mark - Live Stream
3945- (int)addLiveStreamTask:(NERtcLiveStreamTaskInfo *)taskInfo compeltion:(NERtcLiveStreamCompletion)completion;
3946
4000- (int)updateLiveStreamTask:(NERtcLiveStreamTaskInfo *)taskInfo compeltion:(NERtcLiveStreamCompletion)completion;
4001
4055- (int)removeLiveStreamTask:(NSString *)taskId compeltion:(NERtcLiveStreamCompletion)completion;
4056
4057#pragma mark - Audio Frame Observer
4108- (int)setRecordingAudioFrameParameters:(nullable NERtcAudioFrameRequestFormat *)format;
4109
4110
4160- (int)setPlaybackAudioFrameParameters:(nullable NERtcAudioFrameRequestFormat *)format;
4161
4212- (int)setMixedAudioFrameParameters:(nullable NERtcAudioFrameRequestFormat *)format;
4213
4258- (int)setAudioFrameObserver:(nullable id<NERtcEngineAudioFrameObserver>)observer;
4259
4260
4269- (int)setVideoFrameObserver:(nullable id<NERtcEngineVideoFrameObserver>)videoframeObserver;
4270
4271
4272#pragma mark - Volume Indication
4324- (int)enableAudioVolumeIndication:(BOOL)enable interval:(uint64_t)interval;
4325
4391- (int)enableAudioVolumeIndication:(BOOL)enable interval:(uint64_t)interval vad:(BOOL)enableVad;
4392
4393
4394#pragma mark - Signal Volume
4437- (int)adjustRecordingSignalVolume:(uint32_t)volume;
4438
4482- (int)adjustPlaybackSignalVolume:(uint32_t)volume;
4483
4539- (int)adjustUserPlaybackSignalVolume:(uint32_t)volume forUserID:(uint64_t)userID;
4540
4576- (int)adjustChannelPlaybackSignalVolume:(uint32_t)volume;
4577
4578#pragma mark - Voice Effect
4579
4600- (int)setLocalVoicePitch:(double)pitch;
4601
4618- (int)setLocalVoiceEqualizationOfBandFrequency:(NERtcAudioEqualizationBandFrequency)bandFrequency withGain:(NSInteger)gain;
4619
4660- (int)setVoiceBeautifierPreset:(NERtcVoiceBeautifierType)type;
4661
4704- (int)setAudioEffectPreset:(NERtcVoiceChangerType)type;
4705
4726- (int)setLocalVoiceReverbParam:(NERtcReverbParam *)param;
4727
4728#pragma mark - WaterMark
4751- (int)setLocalVideoWatermarkConfigs:(nullable NERtcVideoWatermarkConfig *)config
4752 withStreamType:(NERtcStreamChannelType)type;
4753
4754#pragma mark - Snapshot
4781- (int)takeLocalSnapshot:(NERtcStreamChannelType)streamType callback:(NERtcTakeSnapshotCallback)callback;
4782
4809- (int)takeRemoteSnapshot:(NERtcStreamChannelType)streamType forUserID:(uint64_t)userID callback:(NERtcTakeSnapshotCallback)callback;
4810
4811#pragma mark - Other
4826- (int)uploadSdkInfo;
4827
4837- (int)reportCustomEvent:(NSString *)eventName
4838 customIdentify:(NSString *)customIdentify
4839 param:(NSDictionary *)param;
4840
4841#pragma mark - SEI
4842
4879- (int)sendSEIMsg:(NSData *)data streamChannelType:(NERtcStreamChannelType)type;
4880
4915- (int)sendSEIMsg:(NSData *)data;
4916
4917#pragma mark- MediaRelay
4918
4945- (int)startChannelMediaRelay:(NERtcChannelMediaRelayConfiguration *_Nonnull)config;
4946
4971- (int)updateChannelMediaRelay:(NERtcChannelMediaRelayConfiguration *_Nonnull)config;
4972
5004- (int)stopChannelMediaRelay;
5005
5031- (int)enableSuperResolution:(BOOL)enabled;
5032
5063- (int)enableEncryption:(BOOL)enable config:(NERtcEncryptionConfig *)config;
5064
5065#pragma mark - NetworkQualiityTest
5066
5096- (int)startLastmileProbeTest:(NERtcLastmileProbeConfig *_Nullable)config;
5097
5114- (int)stopLastmileProbeTest;
5115
5116#pragma mark -
5130- (nullable NERtcChannel *)createChannel:(NSString *)channelName;
5131
5132#pragma mark - Video Effect
5133
5166- (int)enableVideoCorrection:(BOOL)enable;
5167
5194- (int)setVideoCorrectionConfig:(nullable NERtcVideoCorrectionConfiguration *)config;
5195
5243- (int)enableVirtualBackground:(BOOL)enable backData:(NERtcVirtualBackgroundSource *_Nullable)backData;
5244
5245#pragma mark - Cloud Proxy
5246
5267- (int)setCloudProxy:(NERtcTransportType)proxyType;
5268
5310- (void)setStreamAlignmentProperty:(BOOL)enable;
5311
5326- (int64_t)getNtpTimeOffset;
5327
5328#pragma mark - encoder & decoder
5329
5367- (int)setPreDecodeObserver:(nullable id<NERtcEnginePreDecodeObserver>)observer;
5368
5369
5407- (int)setVideoEncoderQosObserver:(nullable id<NERtcEngineVideoEncoderQosObserver>)encoderQosObserver;
5408
5456- (int)pushExternalAudioEncodedFrame:(NERtcAudioEncodedFrame *)encodedAudioFrame;
5457
5505- (int)pushExternalSubStreamAudioEncodedFrame:(NERtcAudioEncodedFrame *)encodedAudioFrame;
5506
5560- (int)pushExternalVideoEncodedFrame:(NERtcVideoEncodedFrame *)encodedVideoFrame;
5561
5615- (int)pushExternalSubStreamVideoEncodedFrame:(NERtcVideoEncodedFrame *)encodedVideoFrame;
5616
5617
5618#pragma mark - push streaming
5619
5700- (int)startPushStreaming:(NERtcPushStreamingConfig *)config;
5701
5744- (int)stopPushStreaming;
5745
5746@end
5747
5748NS_ASSUME_NONNULL_END
5749
5750#pragma clang diagnostic pop
5751
5752#endif /* INERtcEngineEx_h */
void(^ NERtcTakeSnapshotCallback)(int errorCode, UIImage *_Nullable image)
截图结果 block 回调。
Definition INERtcEngine.h:64
void(^ NERtcLiveStreamCompletion)(NSString *taskId, kNERtcLiveStreamError errorCode)
互动直播推流 block。
Definition INERtcEngine.h:50
NERtcAudioEqualizationBandFrequency
频谱子带索引 预设值。
Definition NERtcEngineEnum.h:2161
NERtcAudioDumpType
音频 dump 类型
Definition NERtcEngineEnum.h:1720
NERtcVoiceChangerType
变声 预设值。
Definition NERtcEngineEnum.h:2262
NERtcSpatializerRenderMode
空间音效渲染模式
Definition NERtcEngineEnum.h:1864
NERtcDistanceRolloffModel
空间音效衰减模式
Definition NERtcEngineEnum.h:1890
NERtcVideoRotationMode
视频旋转模式。
Definition NERtcEngineEnum.h:770
NERtcAudioRecordingQuality
录音音质。
Definition NERtcEngineEnum.h:1995
NERtcCameraPosition
指定的摄像头位置。
Definition NERtcEngineEnum.h:1380
NERtcRemoteVideoStreamType
远端视频流类型。
Definition NERtcEngineEnum.h:656
NERtcStreamFallbackOptions
Definition NERtcEngineEnum.h:1951
NERtcRangeAudioMode
Definition NERtcEngineEnum.h:1909
NERtcFeatureType
功能类型
Definition NERtcEngineEnum.h:392
NERtcStreamChannelType
SEI 发送的流通道类型。
Definition NERtcEngineEnum.h:1063
NERtcAudioSessionOperationRestriction
音频会话控制权限。 SDK 对 Audio Session 的控制权限。
Definition NERtcEngineEnum.h:1673
NERtcTransportType
云代理模式。
Definition NERtcEngineEnum.h:3439
NERtcVoiceBeautifierType
美声 预设值。
Definition NERtcEngineEnum.h:2354
NERtcVideoRenderScaleMode
视频渲染缩放模式。
Definition NERtcEngineEnum.h:732
NERtcMediaPriorityType
Definition NERtcEngineEnum.h:1930
NERtcAudioStreamType
音频流类型,目前同时支持音频两路流:主流和辅流
Definition NERtcEngineEnum.h:1706
编码好的音频数据
Definition NERtcEngineBase.h:2926
音频帧。
Definition NERtcEngineBase.h:1517
音频原始数据回调格式(默认不设置)。
Definition NERtcEngineBase.h:1404
Definition NERtcEngineBase.h:903
摄像头采集配置。
Definition NERtcEngineBase.h:488
Definition NERtcChannel.h:14
Definition NERtcEngineBase.h:1751
Options for creating audio effects
Definition NERtcEngineBase.h:806
Options for creating mixing audios
Definition NERtcEngineBase.h:688
配置媒体流加密模式和密钥。
Definition NERtcEngineBase.h:2180
Last mile 网络探测配置。
Definition NERtcEngineBase.h:2367
直播推流任务的配置。
Definition NERtcEngineBase.h:1308
3D 音效算法中坐标信息。
Definition NERtcEngineBase.h:2976
Definition NERtcEngineBase.h:3151
混响参数
Definition NERtcEngineBase.h:2669
3D 音效房间属性设置。
Definition NERtcEngineBase.h:3052
视频画布设置。
Definition NERtcEngineBase.h:296
视频图像畸变矫正相关设置。
Definition NERtcEngineBase.h:2568
Definition NERtcEngineBase.h:2884
视频帧信息。
Definition NERtcEngineBase.h:1607
本地辅流发送配置。
Definition NERtcEngineBase.h:648
视频水印设置,目前支持三种类型的水印,但只能其中选择一种水印生效。
Definition NERtcEngineBase.h:2126
自定义背景图像。
Definition NERtcEngineBase.h:2605