NERtc macOS SDK V5.6.30
|
namespace nertc 更多...
类型定义 | |
typedef uint64_t | uid_t |
typedef uint64_t | channel_id_t |
typedef void * | source_id_t |
typedef void(* | onFrameDataCallback) (uid_t uid, void *data, uint32_t type, uint32_t width, uint32_t height, uint32_t count, uint32_t offset[4], uint32_t stride[4], uint32_t rotation, void *user_data) |
typedef NERtcVideoDimensions | NERtcDimensions |
namespace nertc
typedef uint64_t nertc::channel_id_t |
64 位无符号整数。建议设置范围:1 到 263-1,并保证唯一性。
typedef void(* nertc::onFrameDataCallback) (uid_t uid, void *data, uint32_t type, uint32_t width, uint32_t height, uint32_t count, uint32_t offset[4], uint32_t stride[4], uint32_t rotation, void *user_data) |
视频帧数据回调
uid | 用户 ID |
data | 数据指针 |
type | 数据类型 NERtcVideoType |
width | 宽度 |
height | 高度 |
count | 数据类型个数,即 offset 及 stride 的数目 |
offset | 每类数据偏移 |
stride | 每类数据步进 |
rotation | 画面旋转角度 NERtcVideoRotation |
user_data | 用户透传数据 |
typedef void* nertc::source_id_t |
用于标识屏幕捕捉的源,代表某个窗口或屏幕。源为窗口时, Windows 上该类型会转换为 HWND, MAC 上转换为整形。源为屏幕时会转换为整形。
typedef uint64_t nertc::uid_t |
64 位无符号整数。建议设置范围:1 到 263-1,并保证唯一性。
音频设备连接类型。
混音音乐文件错误码。
音乐文件播放状态。
枚举值 | |
---|---|
kNERtcAudioMixingStateFinished | 音乐文件播放结束。 |
kNERtcAudioMixingStateFailed | 音乐文件报错。参考 NERtcAudioMixingErrorCode |
音频属性。设置采样率,码率,编码模式和声道数。
音频应用场景。不同的场景设置对应不同的音频采集模式、播放模式。
美颜类型。
媒体流转发回调事件。
枚举值 | |
---|---|
kNERtcChannelMediaRelayEventDisconnect | 媒体流转发停止。 |
kNERtcChannelMediaRelayEventConnecting | SDK 正在连接服务器,开始尝试转发媒体流。 |
kNERtcChannelMediaRelayEventConnected | 连接服务器成功。 |
kNERtcChannelMediaRelayEventVideoSentToDestChannelSuccess | 视频音频媒体流成功转发到目标房间。 |
kNERtcChannelMediaRelayEventAudioSentToDestChannelSuccess | 音频媒体流成功转发到目标房间。 |
kNERtcChannelMediaRelayEventOtherStreamSentToDestChannelSuccess | 媒体流屏幕共享等其他流成功转发到目标房间。 |
kNERtcChannelMediaRelayEventFailure | 媒体流转发失败。原因包括:
|
媒体流转发状态。
场景模式。
枚举值 | |
---|---|
kNERtcChannelProfileCommunication | (默认)通信场景。该场景下,房间内所有用户都可以发布和接收音、视频流。适用于语音通话、视频群聊等应用场景。 |
kNERtcChannelProfileLiveBroadcasting | Live Streaming Scenario. This scenario involves two types of user roles (NERtcClientRole): streamers and viewers. Streamers are capable of publishing and receiving audio-video streams, whereas viewers directly receive these streams. It is applicable to use cases such as voice chat rooms, video live streaming, and interactive large-class courses. |
kNERtcChannelProfileVideoCall | Video 1-on-1 Call Scenario. This scenario involves turning off the video substream mode, automatically turning on video, automatically subscribing to video, setting the video format to 640x360/480 at 15 fps, employing a transmission strategy that preserves clarity with high bitrate, using an audio encoding sampling rate of 16k, and specifying an audio bitrate of 20kbps.
|
kNERtcChannelProfileHighQualityVideoCall | Higher Clarity 1-on-1 Call Scenario. This scenario involves disabling the video substream mode, automatically activating video, and auto-subscribing to video. The video format is set at 960x540 running at 15 frames per second (fps). The transmission strategy focuses on maintaining clarity with a high bitrate. Audio encoding utilizes a sample rate of 24 kilohertz (kHz), with the audio bitrate specified at 48 kilobits per second (kbps).
|
kNERtcChannelProfileChatroom | Voice Chat Room Scenario. This scenario entails disabling the video substream mode, turning off automatic video activation, and deactivating automatic video subscription. The video format is configured at 640x360 or 640x480 running at 15 frames per second (fps). The transmission strategy emphasizes clarity with a high bitrate. Audio encoding uses a sample rate of 48 kilohertz (kHz), while the audio bitrate is set at 48 kilobits per second (kbps).
|
kNERtcChannelProfileHighQualityChatroom | High-Quality Voice Chat Room Scenario. In this context, the video substream mode is disabled, automatic video activation is turned off, and automatic video subscription is also deactivated. The video format is set to 640x360 or 640x480 at 15 frames per second (fps). The transmission strategy prioritizes clarity with a high bitrate. Audio encoding employs a sample rate of 48 kilohertz (kHz), and the audio bitrate is specified at 96 kilobits per second (kbps).
|
kNERtcChannelProfileMeeting | Conference scenario. In this setting, the video substream mode is enabled, automatic video activation is disabled, automatic video subscription is turned off, the video format is set to 1280x720 at 30 fps, the transmission strategy aims for a balance between clarity and frame rate with a lower bitrate, audio encoding utilizes a sampling rate of 24kHz, and the audio bitrate is configured at 48kbps.
|
kNERtcChannelProfileKaraoke | Karaoke (KTV) scenario. In this scenario, the video substream mode is disabled, automatic video activation is turned off, automatic video subscription is disabled, the video format is set to 640x360/480 at 15 fps, the transmission strategy prioritizes clarity with high bitrate, audio encoding uses a sampling rate of 48kHz, and the bitrate for audio is set to 96kbps.
|
当前房间的连接状态。
NERtcDegradationPreference 视频编码策略。
错误代码。
错误代码意味着 SDK 遇到不可恢复的错误,需要应用程序干预。
连麦方式。
视频水印状态。
enum nertc::NERtcLogLevel |
日志级别。
网络质量类型。
连接状态变更原因
room server 相关错误码。TODO:NERtcErrorCode Will be deprecated, please use NERtcError instead
屏幕分享状态
空间音效中房间材质名称
上行、下行弱网时的回退选项。
屏幕共享功能的编码策略倾向。
枚举值 | |
---|---|
kNERtcSubStreamContentPreferMotion | 动画模式。 |
kNERtcSubStreamContentPreferDetails | 细节模式。 |
视频旋转的方向模式。
虚拟背景未成功启用的原因或确认成功的信息。
枚举值 | |
---|---|
kNERtcVirtualBackgroundSourceStateReasonSuccess | 0: 虚拟背景开启成功。 |
kNERtcVirtualBackgroundSourceStateReasonImageNotExist | 1:自定义背景图片不存在。 请检查 VirtualBackgroundSource 中 |
kNERtcVirtualBackgroundSourceStateReasonImageFormatNotSupported | 2:自定义背景图片的图片格式无效。 请检查 VirtualBackgroundSource 中 |
kNERtcVirtualBackgroundSourceStateReasonColorFormatNotSupported | 3:自定义背景图片的颜色格式无效。 请检查 VirtualBackgroundSource 中 |
kNERtcVirtualBackgroundSourceStateReasonDeviceNotSupported | 4:该设备不支持使用虚拟背景。 |
预设的美声效果
音效均衡波段的中心频率
enum nertc::NERtcWarnCode |