11#ifndef PRE_RTC_CTRL_INTERFACE_H
12#define PRE_RTC_CTRL_INTERFACE_H
320 virtual
int startBeauty(const std::
string& beautyResourcePath) = 0;
virtual int startAudioDump(NEAudioDumpType type)=0
启用音频Dump
virtual int enumRecordDevices(std::vector< NEDeviceBaseInfo > &deviceList)=0
枚举音频采集设备
virtual int enableAudioAINS(bool enable)=0
开启音频 AI 降噪
virtual int stopBeauty()=0
结束美颜模块
virtual ~INEPreviewRoomRtcController()=default
析构函数
virtual int setBeautyFilterLevel(float level)=0
设置滤镜强度
virtual int setMixedAudioFrameParameters(int sampleRate)=0
设置录制和播放声音混音后的采样率
virtual int startBeauty()=0
启用美颜模块
virtual uint32_t getPlayoutDeviceVolume()=0
获取音频播放设备音量
virtual int startVideoPreview()=0
开始预览
virtual NERoomVirtualBackgroundSupportedType getVirtualBackgroundSupportedType()=0
获取虚拟背景支持类型
virtual int stopVideoPreview()=0
停止预览
virtual int setupLocalVideoCanvas(const NERoomVideoView &videoView)=0
设置本地视频画布
virtual int setParameters(const std::string ¶ms)=0
设置音视频通话的相关参数
virtual int removeBeautyFilter()=0
移除滤镜效果
virtual int getPlayoutDeviceMute(bool &mute)=0
获取音频播放设备静音状态
virtual int enumCameraDevices(std::vector< NEDeviceBaseInfo > &deviceList)=0
枚举视频设备
virtual void setupVideoFrameOriginalDataCallback(const VideoFrameOriginalDataCallback &callback)=0
设置视频原始数据回调
virtual int getDefaultRecordDevice(NEDeviceBaseInfo &deviceInfo)=0
获取默认音频采集设备
virtual int setLocalVoicePitch(double pitch)=0
设置本地语音音调
virtual int setRecordDeviceMute(bool mute)=0
静音或取消静音音频采集设备
virtual int selectPlayoutDevice(const std::string &deviceId)=0
选择音频播放设备
virtual int setLocalVoiceEqualization(NERoomAudioEqualizationBandFrequency bandFrequency, int bandGain)=0
设置本地语音音效均衡,即自定义设置本地人声均衡波段的中心频率
virtual int64_t getNtpTimeOffset()=0
获取本地系统时间与服务端时间差值
virtual int setAudioFrameObserver(INERoomRtcAudioFrameObserver *observer)=0
注册语音观测器对象
virtual int enableAudioVolumeAutoAdjust(bool enable)=0
开启自动调节麦克风音量
virtual int pushExternalVideoFrame(const NERoomVideoFrame &frame)=0
推送外部视频帧
virtual int addBeautyFilter(const std::string &filterResourcePath)=0
添加滤镜效果
virtual int setLocalVideoResolution(NEVideoResolution videoResolution)=0
设置本地视频分辨率
virtual int stopPlayoutDeviceTest()=0
停止音频播放设备测试
virtual uint32_t getRecordDeviceVolume()=0
获取音频采集设备音量
virtual void setStreamAlignmentProperty(bool enable)=0
开启精准对齐功能
virtual int setBeautyEffect(NERoomBeautyEffectType beautyType, float level)=0
开启指定美颜效果,并设置美颜强度
void(* VideoFrameOriginalDataCallback)(const std::string userUuid, void *data, NEVideoType type, uint32_t width, uint32_t height, uint32_t count, uint32_t offset[4], uint32_t stride[4], NEVideoRotation rotation)
自定义渲染回调
virtual int setAudioProfile(NERoomRtcAudioProfileType profile, NERoomRtcAudioScenarioType scenario)=0
设置音频编码属性
virtual int getSelectedPlayoutDevice(std::string &deviceId)=0
获取选中的音频播放设备
virtual int enumPlayoutDevices(std::vector< NEDeviceBaseInfo > &deviceList)=0
枚举音频播放设备
virtual int setPlayoutDeviceMute(bool mute)=0
静音或取消静音音频播放设备
virtual int getSelectedRecordDevice(std::string &deviceId)=0
获取选中的音频采集设备
virtual int setChannelProfile(NERoomRtcChannelProfileType profile)=0
设置房间场景 房间场景可设置为通话或直播场景,不同的场景中 QoS 策略不同。
virtual int stopAudioDump()=0
关闭音频Dump
virtual int removeBeautySticker()=0
移除贴纸效果
virtual int enableAudioEchoCancellation(bool enable)=0
开启回音消除
virtual int enableBeauty(bool isOpenBeauty)=0
打开美颜功能
virtual int enableAudioVolumeIndication(bool enable, int interval)=0
启用说话者音量提示
virtual int installAudioCaptureDriver()=0
检查音频共享驱动是否正确安装
virtual int setExternalVideoSource(bool enabled)=0
开启或关闭外部视频源数据输入
virtual int setRecordDeviceVolume(uint32_t volume)=0
设置音频采集设备音量
virtual int setLocalVideoFramerate(NEVideoFramerate framerate)=0
设置本地视频帧率
virtual int getDefaultPlayoutDevice(NEDeviceBaseInfo &deviceInfo)=0
获取默认音频播放设备
virtual int startPlayoutDeviceTest(const std::string &mediaFile)=0
开始音频播放设备测试
virtual int enableAudioAI(bool enable)=0
开启音频AI降噪
virtual int selectRecordDevice(const std::string &deviceId)=0
选择音频采集设备
virtual int addBeautySticker(const std::string &stickerResourcePath)=0
添加美颜贴纸
virtual int adjustRecordingSignalVolume(uint32_t volume)=0
调节采集信号音量
virtual int selectCameraDevice(const std::string &deviceId)=0
选择视频设备
virtual int enableVirtualBackground(bool enable, const NERoomVirtualBackgroundSource &backgroundSource)=0
开启虚拟背景
virtual int startRecordDeviceTest(uint64_t interval=200)=0
启动音频采集设备测试
virtual int setAudioDeviceAutoSelectType(NEAudioDeviceAutoSelectType type)=0
设置音频设备自动选择策略
virtual int adjustPlaybackSignalVolume(int volume)=0
调节本地播放的所有远端用户的信号音量
virtual int setLocalVoiceReverbParam(const NERoomReverbParam ¶m)=0
设置本地语音混响参数
virtual int setPlayoutDeviceVolume(uint32_t volume)=0
设置音频播放设备音量
virtual int setRecordingAudioFrameParameters(const NERoomRtcAudioFrameRequestFormat &format)=0
设置录制的声音格式
virtual int getSelectedCameraDevice(std::string &deviceId)=0
获取当前所使用的视频设备Id
virtual int stopRecordDeviceTest()=0
停止音频采集设备测试
#define ROOMKIT_DEPRECATED(message)
struct tagNERoomVirtualBackgroundSource { NEBackgroundSourceType sourceType=NEBackgroundSourceType::kNEBackgroundColor; unsigned int color=0xffffff; std::string path;} NERoomVirtualBackgroundSource
自定义背景图像
struct tagNERoomReverbParam { float wetGain=0.0f; float dryGain=1.0f; float damping=1.0f; float roomSize=0.1f; float decayTime=0.1f; float preDelay=0.0f; } NERoomReverbParam
混响参数
struct tagNERoomVideoFrame { NEVideoType format=kNEVideoTypeI420; uint64_t timestamp=0; uint32_t width=0; uint32_t height=0; NEVideoRotation rotation=kNEVideoRotation_0; void *buffer=nullptr; } NERoomVideoFrame
外部输入的视频帧
enum { kNEVideoRotation_0=0, kNEVideoRotation_90=90, kNEVideoRotation_180=180, kNEVideoRotation_270=270, } NEVideoRotation
视频帧旋转角度
enum tagNEAudioDumpType { kNEAudioDumpTypePCM=0, kNEAudioDumpTypeAll=1, kNEAudioDumpTypeWAV=2 } NEAudioDumpType
音频dump文件类型
enum tagNERoomRtcAudioScenarioType { kNEAudioScenarioDefault=0, kNEAudioScenarioSpeech=1, kNEAudioScenarioMusic=2, } NERoomRtcAudioScenarioType
音频应用场景。不同的场景设置对应不同的音频采集模式、播放模式
enum tagNERoomAudioEqualizationBandFrequency { kNEVoiceEqualizationBand_31=0, kNEVoiceEqualizationBand_62=1, kNEVoiceEqualizationBand_125=2, kNEVoiceEqualizationBand_250=3, kNEVoiceEqualizationBand_500=4, kNEVoiceEqualizationBand_1K=5, kNEVoiceEqualizationBand_2K=6, kNEVoiceEqualizationBand_4K=7, kNEVoiceEqualizationBand_8K=8, kNEVoiceEqualizationBand_16K=9, } NERoomAudioEqualizationBandFrequency
音效均衡波段的中心频率
enum { kNEVideoFramerateFpsDefault=0, kNEVideoFramerateFps_7=7, kNEVideoFramerateFps_10=10, kNEVideoFramerateFps_15=15, kNEVideoFramerateFps_24=24, kNEVideoFramerateFps_30=30, kNEVideoFramerateFps_60=60, } NEVideoFramerate
视频帧率
enum tagNERoomRtcChannelProfileType { kNEChannelProfileCommunication=0, kNEChannelProfileLiveBroadcasting=1, } NERoomRtcChannelProfileType
场景模式
enum { kNEVideoProfileUsingTemplate=-1, kNEVideoProfileLowest=0, kNEVideoProfileLow=1, kNEVideoProfileStandard=2, kNEVideoProfileHD720P=3, kNEVideoProfileHD1080P=4, kNEVideoProfile4KUHD=5, kNEVideoProfile8KUHD=6, kNEVideoProfileNone=7, kNEVideoProfileMAX=kNEVideoProfile8KUHD } NEVideoResolution
视频分辨率
struct tagNERoomVideoView { bool setup=false; void *window=nullptr; NEVideoScalingMode scalingMode=kVideoScaleFit; NEVideoMirrorMode mirrorMode=kVideoMirrorModeDisabled; } NERoomVideoView
视频画布
enum tagVirtualBackgroundSupportedType { kNEVirtualBackgroundSupportFull=0, kNEVirtualBackgroundSupportHardwareLimit=1, kNEVirtualBackgroundSupportPerformanceLimit=2 } NERoomVirtualBackgroundSupportedType
设备支持级别。
enum tagNEVideoType { kNEVideoTypeI420=0, kNEVideoTypeNV12=1, kNEVideoTypeNV21=2, kNEVideoTypeBGRA=3, } NEVideoType
视频帧格式
enum tagNERoomRtcAudioProfileType { kNEAudioProfileDefault=0, kNEAudioProfileStandard=1, kNEAudioProfileStandardExtend=2, kNEAudioProfileMiddleQuality=3, kNEAudioProfileMiddleQualityStereo=4, kNEAudioProfileHighQuality=5, kNEAudioProfileHighQualityStereo=6, } NERoomRtcAudioProfileType
音频属性。设置采样率,码率,编码模式和声道数
enum { kNEAudioDeviceAutoSelectTypeDefault=0, kNEAudioDeviceAutoSelectTypeAvailable=1, } NEAudioDeviceAutoSelectType
音频设备自动选择策略
struct tagNERoomRtcAudioFrameRequestFormat { uint32_t channels=0; uint32_t sampleRate=0; NERoomRtcAudioFrameOpMode mode=kNERawAudioFrameOpModeReadWrite; } NERoomRtcAudioFrameRequestFormat
音频帧请求格式
enum { kNERoomBeautyWhiteTeeth=0, kNERoomBeautyLightEye, kNERoomBeautyWhiten, kNERoomBeautySmooth, kNERoomBeautySmallNose, kNERoomBeautyEyeDis, kNERoomBeautyEyeAngle, kNERoomBeautyMouth, kNERoomcBeautyBigEye, kNERoomBeautySmallFace, kNERoomBeautyJaw, kNERoomBeautyThinFace, kNERoomBeautyFaceRuddy, kNERoomBeautyLongNose, kNERoomBeautyRenZhong, kNERoomBeautyMouthAngle, kNERoomBeautyRoundEye, kNERoomBeautyOpenEyeAngle, kNERoomBeautyVFace, kNERoomBeautyThinUnderjaw, kNERoomBeautyNarrowFace, kNERoomBeautyCheekBone, kNERoomBeautyFaceSharpen } NERoomBeautyEffectType
美颜类型。
struct tagDeviceBaseInfo { std::string deviceName; std::string deviceId; bool unavailable=true; bool defaultDevice=false; int transportType=0; } NEDeviceBaseInfo
设备基本信息