question
stringlengths 1
57
| tag
stringclasses 18
values | response
stringlengths 112
68.3k
| content
stringlengths 238
68.5k
| __index_level_0__
int64 0
12k
|
---|---|---|---|---|
QNRTCClient | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows >QNRTCClient
# QNRTCClient
最近更新时间: 2022-03-23 23:11:41
RTC 核心类,包含加入房间,离开房间,订阅、发布 Track,获取统计信息等功能
Index
Core Methods
* SetClientRole
* SetAutoSubscribe
* Join
* Leave
* GetConnectionState
* Publish
* UnPublish
* Subscribe
* UnSubscribe
* SendCustomMessage
* SetLiveStreamingListener
* StartLiveStreaming[1/2]
* StartLiveStreaming[2/2]
* StopLiveStreaming[1/2]
* StopLiveStreaming[2/2]
* SetTranscodingLiveStreamingTracks
* RemoveTranscodingLiveStreamingTracks
* SetRemoteAudioMixedFrameListener
* GetPublishedTracks
* GetRemoteUsers[1/2]
* GetRemoteUsers[2/2]
* GetRemoteVideoTrackStats
* GetRemoteAudioTrackStats
* GetLocalVideoTrackStats
* GetLocalAudioTrackStats
Core Methods
SetClientRole
* virtual void SetClientRole([QNClientRole](https://developer.qiniu.com/rtc/9446/qnrtcclient/11332/QNClientRole) client_role, [QNClientRoleListener](https://developer.qiniu.com/rtc/9446/qnrtcclient/11333/QNClientRoleListener)* listener) = 0
* 设置直播场景下的用户角色
该方法在加入频道前后均可调用。
Parameters
* client_role: [QNClientRole](https://developer.qiniu.com/rtc/9446/qnrtcclient/11332/QNClientRole)
目标角色
* listener: [QNClientRoleListener](https://developer.qiniu.com/rtc/9446/qnrtcclient/11333/QNClientRoleListener)
设置角色结果回调
SetAutoSubscribe
* virtual void SetAutoSubscribe(bool auto_subscribe) = 0
* 设置是否启用自动订阅
当开启此选项后,房间内有任意用户新发布 Track 的时候,会自动订阅此路 Track,订阅成功后,会触发
[QNClientEventListener.OnSubscribed](https://developer.qiniu.com/rtc/9446/qnrtcclient/9407)
回调
Parameters
* auto_subscribe: bool
是否自动订阅
Join
* virtual void Join(const std::string& token, const std::string& user_data = "") = 0
* 加入房间
接口调用成功后,将会触发
[QNClientEventListener.OnConnectionStateChanged](https://developer.qiniu.com/rtc/9446/qnrtcclient/9407)
回调
> 请确保在
> [QNConnectionState.kDisconnected](https://developer.qiniu.com/rtc/9446/qnrtcclient/9464)
> 状态下调用该接口加入房间,否则接口调用无效
Parameters
* token: string
房间 Token
* user_data: string
用户信息
Leave
* virtual void Leave() = 0
* 离开房间
成功离开房间后,会触发
[QNClientEventListener.OnConnectionStateChanged](https://developer.qiniu.com/rtc/9446/qnrtcclient/9407)
回调
GetConnectionState
* virtual QNConnectionState GetConnectionState() = 0
* 获取当前房间连接状态
Returns
[QNConnectionState](https://developer.qiniu.com/rtc/9446/qnrtcclient/undefined)
Publish
* virtual void Publish(LocalTrackList& track_list, QNPublishResultCallback* listener) = 0
* 发布本地媒体流,结果通过 [QNPublishResultCallback](https://developer.qiniu.com/rtc/9446/qnrtcclient/9435/QNPublishResultCallback) 接口通知
Parameters
* track_list: std::list<[QNLocalTrack](https://developer.qiniu.com/rtc/9446/qnrtcclient/9422/QNLocalTrack)*>
要发布的本地 Track 列表
* listener: [QNPublishResultCallback](https://developer.qiniu.com/rtc/9446/qnrtcclient/9435/QNPublishResultCallback)
发布结果回调函数
UnPublish
* virtual void UnPublish(LocalTrackList& track_list) = 0
* 取消发布本地媒体列表
Parameters
* track_list: std::list<[QNLocalTrack](https://developer.qiniu.com/rtc/9446/qnrtcclient/9422/QNLocalTrack)*>
要取消发布的本地 Track 列表
Subscribe
* virtual void Subscribe(const RemoteTrackList& track_list) = 0
* 订阅远端 Track 列表,订阅成功后,会触发 [QNClientEventListener.OnSubscribed](https://developer.qiniu.com/rtc/9446/qnrtcclient/9407) 回调
Parameters
* track_list: std::list<shared_ptr<[QNRemoteTrack](https://developer.qiniu.com/rtc/9446/qnrtcclient/9440/QNRemoteTrack)>>
要订阅的远端 Track 列表
UnSubscribe
* virtual void UnSubscribe(const RemoteTrackList& track_list) = 0
* 取消订阅远端 Track 列表
Parameters
* track_list: std::list<shared_ptr<[QNRemoteTrack](https://developer.qiniu.com/rtc/9446/qnrtcclient/9440/QNRemoteTrack)>>
要取消订阅的远端 Track 列表
SendCustomMessage
* virtual void SendCustomMessage(const std::list<std::string>& users_list, const std::string& message_id, const std::string& message) = 0
* 发送自定义消息到指定用户群,发送成功后,会触发远端用户的 [QNClientEventListener.OnMessageReceived](https://developer.qiniu.com/rtc/9446/qnrtcclient/9407) 回调接口
Parameters
* users_list: std::list<std::string>
用户 ID 列表
* message_id: string
自定义消息 ID
* message: string
自定义消息内容
SetLiveStreamingListener
* virtual void SetLiveStreamingListener([QNLiveStreamingListener](https://developer.qiniu.com/rtc/9446/qnrtcclient/9418/QNLiveStreamingListener)* listener) = 0
* 设置 CDN 转推监听接口
Parameters
* listener: [QNLiveStreamingListener](https://developer.qiniu.com/rtc/9446/qnrtcclient/9418/QNLiveStreamingListener)
转推监听接口
StartLiveStreaming[1/2]
* virtual void StartLiveStreaming([QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/9446/qnrtcclient/9414/QNDirectLiveStreamingConfig)& config) = 0
* 开始单路 CDN 转推
Parameters
* config: [QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/9446/qnrtcclient/9414/QNDirectLiveStreamingConfig)
单路转推配置
StartLiveStreaming[2/2]
* virtual void StartLiveStreaming([QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/9446/qnrtcclient/9456/QNTranscodingLiveStreamingConfig)& config) = 0;
* 开始合流转码 CDN 转推
Parameters
* config: [QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/9446/qnrtcclient/9456/QNTranscodingLiveStreamingConfig)
合流转推配置
StopLiveStreaming[1/2]
* virtual void StopLiveStreaming([QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/9446/qnrtcclient/9414/QNDirectLiveStreamingConfig)& config) = 0
* 停止单路 CDN 转推
Parameters
* config: [QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/9446/qnrtcclient/9414/QNDirectLiveStreamingConfig)
单路 CDN 转推配置
StopLiveStreaming[2/2]
* virtual void StopLiveStreaming([QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/9446/qnrtcclient/9456/QNTranscodingLiveStreamingConfig)& config) = 0
* 停止合流转码 CDN 转推
Parameters
* config: [QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/9446/qnrtcclient/9456/QNTranscodingLiveStreamingConfig)
合流转推配置
SetTranscodingLiveStreamingTracks
* virtual void SetTranscodingLiveStreamingTracks(std::string& stream_id, QNTranscodeingTrackList& transcoding_track_list) = 0
* 新增、更新合流转推布局配置
> 新增 track 布局以及对已有的 track 的合流布局进行更新均可通过该接口实现,只需修改 transcodingTracks 对应的 track
> 内容即可。
Parameters
* stream_id: string
合流任务 stream id
* transcoding_track_list: std::list<[QNTranscodingLiveStreamingTrack](https://developer.qiniu.com/rtc/9446/qnrtcclient/9458/QNTranscodingLiveStreamingTrack)>
待新增、更新的合流转推布局配置
RemoveTranscodingLiveStreamingTracks
* virtual void RemoveTranscodingLiveStreamingTracks(std::string& stream_id, QNTranscodeingTrackList& transcoding_track_list) = 0
* 移除合流转推布局配置
Parameters
* stream_id: string
合流任务 stream id
* transcoding_track_list: std::list<[QNTranscodingLiveStreamingTrack](https://developer.qiniu.com/rtc/9446/qnrtcclient/9458/QNTranscodingLiveStreamingTrack)>
待移除合流转推布局配置
SetRemoteAudioMixedFrameListener
* virtual void SetRemoteAudioMixedFrameListener([QNRemoteAudioMixedFrameListener](https://developer.qiniu.com/rtc/9446/qnrtcclient/9437/QNRemoteAudioMixedFrameListener)* listener) = 0
* 设置监听远端所有音频 Track 混合后的音频数据
Parameters
* listener: [QNRemoteAudioMixedFrameListener](https://developer.qiniu.com/rtc/9446/qnrtcclient/9437/QNRemoteAudioMixedFrameListener)
音频数据监听接口
GetPublishedTracks
* virtual LocalTrackList& GetPublishedTracks() = 0
* 获取所有已经发布的本地 Track
Returns
std::list<[QNLocalTrack](https://developer.qiniu.com/rtc/9446/qnrtcclient/9422/QNLocalTrack)*>
GetRemoteUsers[1/2]
* virtual [QNRemoteUser](https://developer.qiniu.com/rtc/9446/qnrtcclient/9441/QNRemoteUser)& GetRemoteUsers(const std::string& user_id) = 0
* 获取对应 ID 的远端用户
Parameters
* user_id: string
远端用户 ID
Returns
[QNRemoteUser](https://developer.qiniu.com/rtc/9446/qnrtcclient/9441/QNRemoteUser)
GetRemoteUsers[2/2]
* virtual RemoteUserList& GetRemoteUsers() = 0
* 获取房间内所有的远端用户
Returns
std::list<[QNRemoteUser](https://developer.qiniu.com/rtc/9446/qnrtcclient/9441/QNRemoteUser)>
GetRemoteVideoTrackStats
* virtual QNRemoteVideoTrackStatsMap& GetRemoteVideoTrackStats() = 0
* 获取已订阅的远端视频轨道统计信息
Returns std::map<std::string,
[QNRemoteVideoTrackStats](https://developer.qiniu.com/rtc/9446/qnrtcclient/9444/QNRemoteVideoTrackStats)>
GetRemoteAudioTrackStats
* virtual QNRemoteAudioTrackStatsMap& GetRemoteAudioTrackStats() = 0
* 获取已订阅的远端音频轨道统计信息
Returns std::map<std::string,
[QNRemoteAudioTrackStats](https://developer.qiniu.com/rtc/9446/qnrtcclient/9439/QNRemoteAudioTrackStats)>
GetLocalVideoTrackStats
* virtual QNLocalVideoTracksStatsMap& GetLocalVideoTrackStats() = 0
* 获取已发布的近端视频轨道统计信息
Returns std::map<std::string,
std::list<[QNLocalVideoTrackStats](https://developer.qiniu.com/rtc/9446/qnrtcclient/9425/QNLocalVideoTrackStats)>>
GetLocalAudioTrackStats
* virtual QNLocalAudioTrackStatsMap& GetLocalAudioTrackStats() = 0
* 获取已发布的近端音频轨道统计信息
Returns std::map<std::string,
[QNLocalAudioTrackStats](https://developer.qiniu.com/rtc/9446/qnrtcclient/9421/QNLocalAudioTrackStats)>
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows >QNRTCClient
# QNRTCClient
最近更新时间: 2022-03-23 23:11:41
RTC 核心类,包含加入房间,离开房间,订阅、发布 Track,获取统计信息等功能
Index
Core Methods
* SetClientRole
* SetAutoSubscribe
* Join
* Leave
* GetConnectionState
* Publish
* UnPublish
* Subscribe
* UnSubscribe
* SendCustomMessage
* SetLiveStreamingListener
* StartLiveStreaming[1/2]
* StartLiveStreaming[2/2]
* StopLiveStreaming[1/2]
* StopLiveStreaming[2/2]
* SetTranscodingLiveStreamingTracks
* RemoveTranscodingLiveStreamingTracks
* SetRemoteAudioMixedFrameListener
* GetPublishedTracks
* GetRemoteUsers[1/2]
* GetRemoteUsers[2/2]
* GetRemoteVideoTrackStats
* GetRemoteAudioTrackStats
* GetLocalVideoTrackStats
* GetLocalAudioTrackStats
Core Methods
SetClientRole
* virtual void SetClientRole([QNClientRole](https://developer.qiniu.com/rtc/9446/qnrtcclient/11332/QNClientRole) client_role, [QNClientRoleListener](https://developer.qiniu.com/rtc/9446/qnrtcclient/11333/QNClientRoleListener)* listener) = 0
* 设置直播场景下的用户角色
该方法在加入频道前后均可调用。
Parameters
* client_role: [QNClientRole](https://developer.qiniu.com/rtc/9446/qnrtcclient/11332/QNClientRole)
目标角色
* listener: [QNClientRoleListener](https://developer.qiniu.com/rtc/9446/qnrtcclient/11333/QNClientRoleListener)
设置角色结果回调
SetAutoSubscribe
* virtual void SetAutoSubscribe(bool auto_subscribe) = 0
* 设置是否启用自动订阅
当开启此选项后,房间内有任意用户新发布 Track 的时候,会自动订阅此路 Track,订阅成功后,会触发
[QNClientEventListener.OnSubscribed](https://developer.qiniu.com/rtc/9446/qnrtcclient/9407)
回调
Parameters
* auto_subscribe: bool
是否自动订阅
Join
* virtual void Join(const std::string& token, const std::string& user_data = "") = 0
* 加入房间
接口调用成功后,将会触发
[QNClientEventListener.OnConnectionStateChanged](https://developer.qiniu.com/rtc/9446/qnrtcclient/9407)
回调
> 请确保在
> [QNConnectionState.kDisconnected](https://developer.qiniu.com/rtc/9446/qnrtcclient/9464)
> 状态下调用该接口加入房间,否则接口调用无效
Parameters
* token: string
房间 Token
* user_data: string
用户信息
Leave
* virtual void Leave() = 0
* 离开房间
成功离开房间后,会触发
[QNClientEventListener.OnConnectionStateChanged](https://developer.qiniu.com/rtc/9446/qnrtcclient/9407)
回调
GetConnectionState
* virtual QNConnectionState GetConnectionState() = 0
* 获取当前房间连接状态
Returns
[QNConnectionState](https://developer.qiniu.com/rtc/9446/qnrtcclient/undefined)
Publish
* virtual void Publish(LocalTrackList& track_list, QNPublishResultCallback* listener) = 0
* 发布本地媒体流,结果通过 [QNPublishResultCallback](https://developer.qiniu.com/rtc/9446/qnrtcclient/9435/QNPublishResultCallback) 接口通知
Parameters
* track_list: std::list<[QNLocalTrack](https://developer.qiniu.com/rtc/9446/qnrtcclient/9422/QNLocalTrack)*>
要发布的本地 Track 列表
* listener: [QNPublishResultCallback](https://developer.qiniu.com/rtc/9446/qnrtcclient/9435/QNPublishResultCallback)
发布结果回调函数
UnPublish
* virtual void UnPublish(LocalTrackList& track_list) = 0
* 取消发布本地媒体列表
Parameters
* track_list: std::list<[QNLocalTrack](https://developer.qiniu.com/rtc/9446/qnrtcclient/9422/QNLocalTrack)*>
要取消发布的本地 Track 列表
Subscribe
* virtual void Subscribe(const RemoteTrackList& track_list) = 0
* 订阅远端 Track 列表,订阅成功后,会触发 [QNClientEventListener.OnSubscribed](https://developer.qiniu.com/rtc/9446/qnrtcclient/9407) 回调
Parameters
* track_list: std::list<shared_ptr<[QNRemoteTrack](https://developer.qiniu.com/rtc/9446/qnrtcclient/9440/QNRemoteTrack)>>
要订阅的远端 Track 列表
UnSubscribe
* virtual void UnSubscribe(const RemoteTrackList& track_list) = 0
* 取消订阅远端 Track 列表
Parameters
* track_list: std::list<shared_ptr<[QNRemoteTrack](https://developer.qiniu.com/rtc/9446/qnrtcclient/9440/QNRemoteTrack)>>
要取消订阅的远端 Track 列表
SendCustomMessage
* virtual void SendCustomMessage(const std::list<std::string>& users_list, const std::string& message_id, const std::string& message) = 0
* 发送自定义消息到指定用户群,发送成功后,会触发远端用户的 [QNClientEventListener.OnMessageReceived](https://developer.qiniu.com/rtc/9446/qnrtcclient/9407) 回调接口
Parameters
* users_list: std::list<std::string>
用户 ID 列表
* message_id: string
自定义消息 ID
* message: string
自定义消息内容
SetLiveStreamingListener
* virtual void SetLiveStreamingListener([QNLiveStreamingListener](https://developer.qiniu.com/rtc/9446/qnrtcclient/9418/QNLiveStreamingListener)* listener) = 0
* 设置 CDN 转推监听接口
Parameters
* listener: [QNLiveStreamingListener](https://developer.qiniu.com/rtc/9446/qnrtcclient/9418/QNLiveStreamingListener)
转推监听接口
StartLiveStreaming[1/2]
* virtual void StartLiveStreaming([QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/9446/qnrtcclient/9414/QNDirectLiveStreamingConfig)& config) = 0
* 开始单路 CDN 转推
Parameters
* config: [QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/9446/qnrtcclient/9414/QNDirectLiveStreamingConfig)
单路转推配置
StartLiveStreaming[2/2]
* virtual void StartLiveStreaming([QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/9446/qnrtcclient/9456/QNTranscodingLiveStreamingConfig)& config) = 0;
* 开始合流转码 CDN 转推
Parameters
* config: [QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/9446/qnrtcclient/9456/QNTranscodingLiveStreamingConfig)
合流转推配置
StopLiveStreaming[1/2]
* virtual void StopLiveStreaming([QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/9446/qnrtcclient/9414/QNDirectLiveStreamingConfig)& config) = 0
* 停止单路 CDN 转推
Parameters
* config: [QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/9446/qnrtcclient/9414/QNDirectLiveStreamingConfig)
单路 CDN 转推配置
StopLiveStreaming[2/2]
* virtual void StopLiveStreaming([QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/9446/qnrtcclient/9456/QNTranscodingLiveStreamingConfig)& config) = 0
* 停止合流转码 CDN 转推
Parameters
* config: [QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/9446/qnrtcclient/9456/QNTranscodingLiveStreamingConfig)
合流转推配置
SetTranscodingLiveStreamingTracks
* virtual void SetTranscodingLiveStreamingTracks(std::string& stream_id, QNTranscodeingTrackList& transcoding_track_list) = 0
* 新增、更新合流转推布局配置
> 新增 track 布局以及对已有的 track 的合流布局进行更新均可通过该接口实现,只需修改 transcodingTracks 对应的 track
> 内容即可。
Parameters
* stream_id: string
合流任务 stream id
* transcoding_track_list: std::list<[QNTranscodingLiveStreamingTrack](https://developer.qiniu.com/rtc/9446/qnrtcclient/9458/QNTranscodingLiveStreamingTrack)>
待新增、更新的合流转推布局配置
RemoveTranscodingLiveStreamingTracks
* virtual void RemoveTranscodingLiveStreamingTracks(std::string& stream_id, QNTranscodeingTrackList& transcoding_track_list) = 0
* 移除合流转推布局配置
Parameters
* stream_id: string
合流任务 stream id
* transcoding_track_list: std::list<[QNTranscodingLiveStreamingTrack](https://developer.qiniu.com/rtc/9446/qnrtcclient/9458/QNTranscodingLiveStreamingTrack)>
待移除合流转推布局配置
SetRemoteAudioMixedFrameListener
* virtual void SetRemoteAudioMixedFrameListener([QNRemoteAudioMixedFrameListener](https://developer.qiniu.com/rtc/9446/qnrtcclient/9437/QNRemoteAudioMixedFrameListener)* listener) = 0
* 设置监听远端所有音频 Track 混合后的音频数据
Parameters
* listener: [QNRemoteAudioMixedFrameListener](https://developer.qiniu.com/rtc/9446/qnrtcclient/9437/QNRemoteAudioMixedFrameListener)
音频数据监听接口
GetPublishedTracks
* virtual LocalTrackList& GetPublishedTracks() = 0
* 获取所有已经发布的本地 Track
Returns
std::list<[QNLocalTrack](https://developer.qiniu.com/rtc/9446/qnrtcclient/9422/QNLocalTrack)*>
GetRemoteUsers[1/2]
* virtual [QNRemoteUser](https://developer.qiniu.com/rtc/9446/qnrtcclient/9441/QNRemoteUser)& GetRemoteUsers(const std::string& user_id) = 0
* 获取对应 ID 的远端用户
Parameters
* user_id: string
远端用户 ID
Returns
[QNRemoteUser](https://developer.qiniu.com/rtc/9446/qnrtcclient/9441/QNRemoteUser)
GetRemoteUsers[2/2]
* virtual RemoteUserList& GetRemoteUsers() = 0
* 获取房间内所有的远端用户
Returns
std::list<[QNRemoteUser](https://developer.qiniu.com/rtc/9446/qnrtcclient/9441/QNRemoteUser)>
GetRemoteVideoTrackStats
* virtual QNRemoteVideoTrackStatsMap& GetRemoteVideoTrackStats() = 0
* 获取已订阅的远端视频轨道统计信息
Returns std::map<std::string,
[QNRemoteVideoTrackStats](https://developer.qiniu.com/rtc/9446/qnrtcclient/9444/QNRemoteVideoTrackStats)>
GetRemoteAudioTrackStats
* virtual QNRemoteAudioTrackStatsMap& GetRemoteAudioTrackStats() = 0
* 获取已订阅的远端音频轨道统计信息
Returns std::map<std::string,
[QNRemoteAudioTrackStats](https://developer.qiniu.com/rtc/9446/qnrtcclient/9439/QNRemoteAudioTrackStats)>
GetLocalVideoTrackStats
* virtual QNLocalVideoTracksStatsMap& GetLocalVideoTrackStats() = 0
* 获取已发布的近端视频轨道统计信息
Returns std::map<std::string,
std::list<[QNLocalVideoTrackStats](https://developer.qiniu.com/rtc/9446/qnrtcclient/9425/QNLocalVideoTrackStats)>>
GetLocalAudioTrackStats
* virtual QNLocalAudioTrackStatsMap& GetLocalAudioTrackStats() = 0
* 获取已发布的近端音频轨道统计信息
Returns std::map<std::string,
[QNLocalAudioTrackStats](https://developer.qiniu.com/rtc/9446/qnrtcclient/9421/QNLocalAudioTrackStats)>
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,615 |
QNRTCClientConfig | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows >QNRTCClientConfig
# QNRTCClientConfig
最近更新时间: 2022-03-23 23:13:44
[QNRTCClient](https://developer.qiniu.com/rtc/11344/qnrtcclientconfig/9446/QNRTCClient)
创建配置类,在
[QNRTC.CreateClient](https://developer.qiniu.com/rtc/11344/qnrtcclientconfig/9445)
的时候使用
Index
Properties
* mode
* role
Properties
mode
* mode: [QNClientMode](https://developer.qiniu.com/rtc/11344/qnrtcclientconfig/11331/QNClientMode)
* 使用场景
role
* role: [QNClientRole](https://developer.qiniu.com/rtc/11344/qnrtcclientconfig/11332/QNClientRole)
* 用户角色
角色类型,仅当使用场景为互动直播时才会生效
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows >QNRTCClientConfig
# QNRTCClientConfig
最近更新时间: 2022-03-23 23:13:44
[QNRTCClient](https://developer.qiniu.com/rtc/11344/qnrtcclientconfig/9446/QNRTCClient)
创建配置类,在
[QNRTC.CreateClient](https://developer.qiniu.com/rtc/11344/qnrtcclientconfig/9445)
的时候使用
Index
Properties
* mode
* role
Properties
mode
* mode: [QNClientMode](https://developer.qiniu.com/rtc/11344/qnrtcclientconfig/11331/QNClientMode)
* 使用场景
role
* role: [QNClientRole](https://developer.qiniu.com/rtc/11344/qnrtcclientconfig/11332/QNClientRole)
* 用户角色
角色类型,仅当使用场景为互动直播时才会生效
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,625 |
QNRTCEventListener | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNRTCEventListener
# QNRTCEventListener
最近更新时间: 2022-03-24 00:24:02
QNRTC 全局事件回调接口,用来监听设备相关的回调事件,如音频路由改变等。可以在 QNRTC 的初始化函数 QNRTC.init 中传入。
Index
Core Methods
* OnVideoDeviceStateChanged
* OnAudioDeviceStateChanged
* OnAudioRouteChanged
Core Methods
OnVideoDeviceStateChanged
* virtual void OnVideoDeviceStateChanged([QNVideoDeviceState](https://developer.qiniu.com/rtc/11345/qnrtceventlistener/9459/QNVideoDeviceState) device_state, const std::string& device_name)
* 摄像头插拔消息通知,该方法仅适用于 Windows 平台
Parameters
* device_state: [QNVideoDeviceState](https://developer.qiniu.com/rtc/11345/qnrtceventlistener/9459/QNVideoDeviceState)
摄像头设备状态
* device_name: string
摄像头设备名
OnAudioDeviceStateChanged
* virtual void OnAudioDeviceStateChanged([QNAudioDeviceState](https://developer.qiniu.com/rtc/11345/qnrtceventlistener/9400/QNAudioDeviceState) device_state, const std::string& device_guid)
* 音频设备插拔消息通知,该方法仅适用于 Windows 平台
Parameters
* device_state: [QNAudioDeviceState](https://developer.qiniu.com/rtc/11345/qnrtceventlistener/9400/QNAudioDeviceState)
设备状态设备状态
* device_guid: string
音频设备 id
OnAudioRouteChanged
* virtual void OnAudioRouteChanged(QNAudioDevice device)
* 音频路由改变通知, 仅适用于 Android 和 iOS 平台
Parameters
* device: QNAudioDevice
当前的音频路由信息
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNRTCEventListener
# QNRTCEventListener
最近更新时间: 2022-03-24 00:24:02
QNRTC 全局事件回调接口,用来监听设备相关的回调事件,如音频路由改变等。可以在 QNRTC 的初始化函数 QNRTC.init 中传入。
Index
Core Methods
* OnVideoDeviceStateChanged
* OnAudioDeviceStateChanged
* OnAudioRouteChanged
Core Methods
OnVideoDeviceStateChanged
* virtual void OnVideoDeviceStateChanged([QNVideoDeviceState](https://developer.qiniu.com/rtc/11345/qnrtceventlistener/9459/QNVideoDeviceState) device_state, const std::string& device_name)
* 摄像头插拔消息通知,该方法仅适用于 Windows 平台
Parameters
* device_state: [QNVideoDeviceState](https://developer.qiniu.com/rtc/11345/qnrtceventlistener/9459/QNVideoDeviceState)
摄像头设备状态
* device_name: string
摄像头设备名
OnAudioDeviceStateChanged
* virtual void OnAudioDeviceStateChanged([QNAudioDeviceState](https://developer.qiniu.com/rtc/11345/qnrtceventlistener/9400/QNAudioDeviceState) device_state, const std::string& device_guid)
* 音频设备插拔消息通知,该方法仅适用于 Windows 平台
Parameters
* device_state: [QNAudioDeviceState](https://developer.qiniu.com/rtc/11345/qnrtceventlistener/9400/QNAudioDeviceState)
设备状态设备状态
* device_guid: string
音频设备 id
OnAudioRouteChanged
* virtual void OnAudioRouteChanged(QNAudioDevice device)
* 音频路由改变通知, 仅适用于 Android 和 iOS 平台
Parameters
* device: QNAudioDevice
当前的音频路由信息
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,626 |
QNRTCSetting | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows >QNRTCSetting
# QNRTCSetting
最近更新时间: 2022-03-30 10:59:56
SDK 的核心参数配置结构体
Index
Properties
* is_aec3_enabled
* is_maintain_resolution_enabled
* is_audio_redundant_enabled
* is_audio_route_to_speakerphone
* log_level
* encoder_type
Properties
is_aec3_enabled
* is_aec3_enabled: bool
* 是否开启软件回音消除,默认开启
is_maintain_resolution_enabled
* is_maintain_resolution_enabled: bool
* 是否固定编码分辨率,默认不固定
is_audio_redundant_enabled
* is_audio_redundant_enabled: bool
* 是否开启音频冗余包发送,开启后能抗抗一定的丢包,默认开启
is_audio_route_to_speakerphone
* is_audio_route_to_speakerphone: bool
* 设置是否配置扬声器为默认音频路由,默认开启,若传入 false,则默认音频路由为听筒,该参数仅适用于 Android 和 iOS
log_level
* log_level: [QNLogLevel](https://developer.qiniu.com/rtc/11343/qnrtcsetting/9432/QNLogLevel)
* 设置日志级别,默认为 kLogInfo 级别
encoder_type
* encoder_type: [QNVideoEncoderType](https://developer.qiniu.com/rtc/11343/qnrtcsetting/9460/QNVideoEncoderType)
* 设置编码类型,Windows 和 Linux 默认 kEncodeOpenH264 软件编码,Android 和 iOS 默认 kEncodeH264MobileHwCodec 编码
其中 Android 和 iOS 也支持 kEncodeOpenH264 软件编码,Windows 支持 kEncodeH264QSV 和
kEncodeH264NVENC 编码类型,Linux 暂不支持硬件编码
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows >QNRTCSetting
# QNRTCSetting
最近更新时间: 2022-03-30 10:59:56
SDK 的核心参数配置结构体
Index
Properties
* is_aec3_enabled
* is_maintain_resolution_enabled
* is_audio_redundant_enabled
* is_audio_route_to_speakerphone
* log_level
* encoder_type
Properties
is_aec3_enabled
* is_aec3_enabled: bool
* 是否开启软件回音消除,默认开启
is_maintain_resolution_enabled
* is_maintain_resolution_enabled: bool
* 是否固定编码分辨率,默认不固定
is_audio_redundant_enabled
* is_audio_redundant_enabled: bool
* 是否开启音频冗余包发送,开启后能抗抗一定的丢包,默认开启
is_audio_route_to_speakerphone
* is_audio_route_to_speakerphone: bool
* 设置是否配置扬声器为默认音频路由,默认开启,若传入 false,则默认音频路由为听筒,该参数仅适用于 Android 和 iOS
log_level
* log_level: [QNLogLevel](https://developer.qiniu.com/rtc/11343/qnrtcsetting/9432/QNLogLevel)
* 设置日志级别,默认为 kLogInfo 级别
encoder_type
* encoder_type: [QNVideoEncoderType](https://developer.qiniu.com/rtc/11343/qnrtcsetting/9460/QNVideoEncoderType)
* 设置编码类型,Windows 和 Linux 默认 kEncodeOpenH264 软件编码,Android 和 iOS 默认 kEncodeH264MobileHwCodec 编码
其中 Android 和 iOS 也支持 kEncodeOpenH264 软件编码,Windows 支持 kEncodeH264QSV 和
kEncodeH264NVENC 编码类型,Linux 暂不支持硬件编码
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,629 |
QNScreenCaptureSourceType | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNScreenCaptureSourceType
# QNScreenCaptureSourceType
最近更新时间: 2022-03-23 23:17:03
屏幕共享源类型
Index
Enum
* QNScreenCaptureSourceType
Enum
QNScreenCaptureSourceType
* Type declaration
* kWindow
* kScreen
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNScreenCaptureSourceType
# QNScreenCaptureSourceType
最近更新时间: 2022-03-23 23:17:03
屏幕共享源类型
Index
Enum
* QNScreenCaptureSourceType
Enum
QNScreenCaptureSourceType
* Type declaration
* kWindow
* kScreen
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,632 |
QNScreenEventListener | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNScreenEventListener
# QNScreenEventListener
最近更新时间: 2022-03-24 15:46:42
屏幕共享异常通知
Index
Core Methods
* OnSreenError
Core Methods
OnSreenError
* virtual void OnSreenError(int error_code, const std::string& error_message)
* 屏幕共享失败回调
Parameters
* error_code: int
详见错误码
[QNErrorCode](https://developer.qiniu.com/rtc/development_guidelines/11350/error-
code-windows)
* error_message: string
错误描述
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNScreenEventListener
# QNScreenEventListener
最近更新时间: 2022-03-24 15:46:42
屏幕共享异常通知
Index
Core Methods
* OnSreenError
Core Methods
OnSreenError
* virtual void OnSreenError(int error_code, const std::string& error_message)
* 屏幕共享失败回调
Parameters
* error_code: int
详见错误码
[QNErrorCode](https://developer.qiniu.com/rtc/development_guidelines/11350/error-
code-windows)
* error_message: string
错误描述
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,633 |
QNScreenVideoTrack | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNScreenVideoTrack
# QNScreenVideoTrack
最近更新时间: 2022-03-23 23:22:13
本地视频录屏 Track 类
> 屏幕共享 track 的创建需要发起系统屏幕录制的申请,具体使用姿势请参考[屏幕共享 track
> 使用指南](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/undefined)。
Hierarchy
* [QNTrack](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/9452/QNTrack)
* [QNLocalTrack](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/9422/QNLocalTrack)
* [QNLocalVideoTrack](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/9424/QNLocalVideoTrack)
* [QNCameraVideoTrack](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/9404/QNCameraVideoTrack)
* QNScreenVideoTrack
* [QNCustomVideoTrack](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/9412/QNCustomVideoTrack)
* [QNLocalAudioTrack](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/9420/QNLocalAudioTrack)
* [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/9433/QNMicrophoneAudioTrack)
* [QNCustomAudioTrack](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/9409/QNCustomAudioTrack)
* [QNRemoteTrack](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/9440/QNRemoteTrack)
* [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/9443/QNRemoteVideoTrack)
* [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/9438/QNRemoteAudioTrack)
Index
Core Methods
* GetTrackID
* GetUserID
* GetTag
* IsAudio
* IsVideo
* IsMuted
* SetMuted
* SetVideoFrameListener
* Play
* SendSEI
* StartCrop
* StopCrop
* StartScale
* StopScale
* StartCapture
* StopCapture
* IsScreenCaptureSupported
Core Methods
GetTrackID
* virtual const std::string& GetTrackID() = 0
* 获取 TrackID
Returns string
GetUserID
* virtual const std::string& GetUserID() = 0
* 获取 UserID
Returns string
GetTag
* virtual const std::string& GetTag() = 0
* 获取 Tag
Returns string
IsAudio
* virtual bool IsAudio() = 0
* 是否为音频 track
Returns bool
IsVideo
* virtual bool IsVideo() = 0
* 是否为视频 track
Returns bool
IsMuted
* virtual bool IsMuted() = 0
* 是否 muted
Returns bool
SetMuted
* virtual void SetMuted(bool muted) = 0
* 设置是否静默该 track,静默后,SDK 将会发送静默帧数据
Parameters
* muted: bool
是否静默
SetVideoFrameListener
* virtual void SetVideoFrameListener([QNVideoFrameListener](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/11326/QNVideoFrameListener)* listener) = 0
* 设置视频数据监听
Parameters
* listener: [QNVideoFrameListener](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/11326/QNVideoFrameListener)
视频数据监听接口
Play
* virtual void Play(QNView& view) = 0
* 设置本地渲染参数
Parameters
* view: [QNView](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/11328/QNView)
渲染参数
SendSEI
* virtual void SendSEI(std::string& message,std::string& uuid,int32_t repeat_count) = 0
* 发送 SEI
Parameters
* message: string
消息内容
* uuid: string
唯一 ID
* repeat_count: int
重复次数, -1 为每一帧都发送
StartCrop
* virtual void StartCrop(uint32_t crop_x,uint32_t crop_y,int32_t crop_width,int32_t crop_height) = 0
* 开启原始帧裁剪功能,设置参数要求如下,如果设置不正确,则输出原始图像
Parameters
* crop_x: uint32_t
开始裁减的 X 坐标点,原点为左上角,必须落在原图之内
* crop_y: uint32_t
开始裁减的 Y 坐标点,原点为左上角,必须落在原图之内
* crop_width: int32_t
目标图像宽度,必须为 4 的整数倍,如果是裁剪模式,crop_x和 crop_y,裁剪图像必须在原始图像之内
* crop_height: int32_t
目标图像高度,必须为 4 的整数倍,如果是裁剪模式,crop_x 和 crop_y,裁剪图像必须在原始图像之内
StopCrop
* virtual void StopCrop() = 0
* 关闭裁剪功能
StartScale
* virtual void StartScale(int32_t dst_width, int32_t dst_height) = 0
* 开启原始帧缩放功能,设置参数要求如下,如果设置不正确,则输出原始图像
Parameters
* dst_width: int32_t
目标图像宽度,必须为 4 的整数倍
* dst_height: int32_t
目标图像高度,必须为 4 的整数倍
StopScale
* virtual void StopScale() = 0
* 关闭缩放功能
StartCapture
* virtual void StartCapture() = 0
* 开启摄像头采集
StopCapture
* virtual void StopCapture() = 0
* 关闭摄像头采集
IsScreenCaptureSupported
* virtual bool IsScreenCaptureSupported() = 0
* 是否支持屏幕共享, 仅适用于 Android 和 iOS 平台
Returns bool
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNScreenVideoTrack
# QNScreenVideoTrack
最近更新时间: 2022-03-23 23:22:13
本地视频录屏 Track 类
> 屏幕共享 track 的创建需要发起系统屏幕录制的申请,具体使用姿势请参考[屏幕共享 track
> 使用指南](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/undefined)。
Hierarchy
* [QNTrack](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/9452/QNTrack)
* [QNLocalTrack](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/9422/QNLocalTrack)
* [QNLocalVideoTrack](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/9424/QNLocalVideoTrack)
* [QNCameraVideoTrack](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/9404/QNCameraVideoTrack)
* QNScreenVideoTrack
* [QNCustomVideoTrack](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/9412/QNCustomVideoTrack)
* [QNLocalAudioTrack](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/9420/QNLocalAudioTrack)
* [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/9433/QNMicrophoneAudioTrack)
* [QNCustomAudioTrack](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/9409/QNCustomAudioTrack)
* [QNRemoteTrack](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/9440/QNRemoteTrack)
* [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/9443/QNRemoteVideoTrack)
* [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/9438/QNRemoteAudioTrack)
Index
Core Methods
* GetTrackID
* GetUserID
* GetTag
* IsAudio
* IsVideo
* IsMuted
* SetMuted
* SetVideoFrameListener
* Play
* SendSEI
* StartCrop
* StopCrop
* StartScale
* StopScale
* StartCapture
* StopCapture
* IsScreenCaptureSupported
Core Methods
GetTrackID
* virtual const std::string& GetTrackID() = 0
* 获取 TrackID
Returns string
GetUserID
* virtual const std::string& GetUserID() = 0
* 获取 UserID
Returns string
GetTag
* virtual const std::string& GetTag() = 0
* 获取 Tag
Returns string
IsAudio
* virtual bool IsAudio() = 0
* 是否为音频 track
Returns bool
IsVideo
* virtual bool IsVideo() = 0
* 是否为视频 track
Returns bool
IsMuted
* virtual bool IsMuted() = 0
* 是否 muted
Returns bool
SetMuted
* virtual void SetMuted(bool muted) = 0
* 设置是否静默该 track,静默后,SDK 将会发送静默帧数据
Parameters
* muted: bool
是否静默
SetVideoFrameListener
* virtual void SetVideoFrameListener([QNVideoFrameListener](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/11326/QNVideoFrameListener)* listener) = 0
* 设置视频数据监听
Parameters
* listener: [QNVideoFrameListener](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/11326/QNVideoFrameListener)
视频数据监听接口
Play
* virtual void Play(QNView& view) = 0
* 设置本地渲染参数
Parameters
* view: [QNView](https://developer.qiniu.com/rtc/9448/qnscreenvideotrack/11328/QNView)
渲染参数
SendSEI
* virtual void SendSEI(std::string& message,std::string& uuid,int32_t repeat_count) = 0
* 发送 SEI
Parameters
* message: string
消息内容
* uuid: string
唯一 ID
* repeat_count: int
重复次数, -1 为每一帧都发送
StartCrop
* virtual void StartCrop(uint32_t crop_x,uint32_t crop_y,int32_t crop_width,int32_t crop_height) = 0
* 开启原始帧裁剪功能,设置参数要求如下,如果设置不正确,则输出原始图像
Parameters
* crop_x: uint32_t
开始裁减的 X 坐标点,原点为左上角,必须落在原图之内
* crop_y: uint32_t
开始裁减的 Y 坐标点,原点为左上角,必须落在原图之内
* crop_width: int32_t
目标图像宽度,必须为 4 的整数倍,如果是裁剪模式,crop_x和 crop_y,裁剪图像必须在原始图像之内
* crop_height: int32_t
目标图像高度,必须为 4 的整数倍,如果是裁剪模式,crop_x 和 crop_y,裁剪图像必须在原始图像之内
StopCrop
* virtual void StopCrop() = 0
* 关闭裁剪功能
StartScale
* virtual void StartScale(int32_t dst_width, int32_t dst_height) = 0
* 开启原始帧缩放功能,设置参数要求如下,如果设置不正确,则输出原始图像
Parameters
* dst_width: int32_t
目标图像宽度,必须为 4 的整数倍
* dst_height: int32_t
目标图像高度,必须为 4 的整数倍
StopScale
* virtual void StopScale() = 0
* 关闭缩放功能
StartCapture
* virtual void StartCapture() = 0
* 开启摄像头采集
StopCapture
* virtual void StopCapture() = 0
* 关闭摄像头采集
IsScreenCaptureSupported
* virtual bool IsScreenCaptureSupported() = 0
* 是否支持屏幕共享, 仅适用于 Android 和 iOS 平台
Returns bool
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,634 |
QNScreenVideoTrackConfig | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNScreenVideoTrackConfig
# QNScreenVideoTrackConfig
最近更新时间: 2022-03-23 23:22:56
桌面、窗口视频采集 Track 的配置
Index
Properties
* encoder_config
* id
* tag
* multi_profile_enabled
* is_window_graphics_capture_enabled
Properties
encoder_config
* encoder_config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/9449/qnscreenvideotrackconfig/11330/QNVideoEncoderConfig)
* 设置摄像头采集数据编码参数
id
* id: string
* 窗口 id
tag
* tag: string
* 自定义标签
multi_profile_enabled
* multi_profile_enabled: bool
* 是否开启多流
is_window_graphics_capture_enabled
* is_window_graphics_capture_enabled: bool
* 是否开启 D3D 录屏,此参数只适用于 Windows
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNScreenVideoTrackConfig
# QNScreenVideoTrackConfig
最近更新时间: 2022-03-23 23:22:56
桌面、窗口视频采集 Track 的配置
Index
Properties
* encoder_config
* id
* tag
* multi_profile_enabled
* is_window_graphics_capture_enabled
Properties
encoder_config
* encoder_config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/9449/qnscreenvideotrackconfig/11330/QNVideoEncoderConfig)
* 设置摄像头采集数据编码参数
id
* id: string
* 窗口 id
tag
* tag: string
* 自定义标签
multi_profile_enabled
* multi_profile_enabled: bool
* 是否开启多流
is_window_graphics_capture_enabled
* is_window_graphics_capture_enabled: bool
* 是否开启 D3D 录屏,此参数只适用于 Windows
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,640 |
QNScreenWindowInfo | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNScreenWindowInfo
# QNScreenWindowInfo
最近更新时间: 2022-03-23 23:24:20
SDK 提供对桌面和窗口的画面采集,以下为可以采集的屏幕或窗口信息
Index
Properties
* id
* title
* type
Properties
id
* id: string
* 窗口 Id,唯一标识
title
* title: string
* 窗口标题
type
* type: [QNScreenCaptureSourceType](https://developer.qiniu.com/rtc/9450/qnscreenwindowinfo/11346/QNScreenCaptureSourceType)
* 窗口类型
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNScreenWindowInfo
# QNScreenWindowInfo
最近更新时间: 2022-03-23 23:24:20
SDK 提供对桌面和窗口的画面采集,以下为可以采集的屏幕或窗口信息
Index
Properties
* id
* title
* type
Properties
id
* id: string
* 窗口 Id,唯一标识
title
* title: string
* 窗口标题
type
* type: [QNScreenCaptureSourceType](https://developer.qiniu.com/rtc/9450/qnscreenwindowinfo/11346/QNScreenCaptureSourceType)
* 窗口类型
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,642 |
QNStretchMode | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows >QNStretchMode
# QNStretchMode
最近更新时间: 2021-09-26 19:18:39
画面渲染窗口填充方式
Index
Enum
* QNStretchMode
Enum
QNStretchMode
* code | describe | message
---|---|---
ASPECT_INVALID | 无效值 | 无
ASPECT_FILL | 在保持长宽比的前提下,缩放视频,使其充满容器 | 无
ASPECT_FIT | 在保持长宽比的前提下,缩放视频,使其在容器内完整显示,边缘部分填充黑边 | 无
SCALE_TO_FIT | 缩放视频,使其填充满容器,可能导致拉伸变形 | 无
Type declaration
* ASPECT_INVALID
* ASPECT_FILL
* ASPECT_FIT
* SCALE_TO_FIT
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows >QNStretchMode
# QNStretchMode
最近更新时间: 2021-09-26 19:18:39
画面渲染窗口填充方式
Index
Enum
* QNStretchMode
Enum
QNStretchMode
* code | describe | message
---|---|---
ASPECT_INVALID | 无效值 | 无
ASPECT_FILL | 在保持长宽比的前提下,缩放视频,使其充满容器 | 无
ASPECT_FIT | 在保持长宽比的前提下,缩放视频,使其在容器内完整显示,边缘部分填充黑边 | 无
SCALE_TO_FIT | 缩放视频,使其填充满容器,可能导致拉伸变形 | 无
Type declaration
* ASPECT_INVALID
* ASPECT_FILL
* ASPECT_FIT
* SCALE_TO_FIT
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,643 |
QNTrack | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows >QNTrack
# QNTrack
最近更新时间: 2022-03-23 23:25:36
音视频 Track 基类
Hierarchy
* QNTrack
* [QNLocalTrack](https://developer.qiniu.com/rtc/9452/qntrack/9422/QNLocalTrack)
* [QNLocalVideoTrack](https://developer.qiniu.com/rtc/9452/qntrack/9424/QNLocalVideoTrack)
* [QNCameraVideoTrack](https://developer.qiniu.com/rtc/9452/qntrack/9404/QNCameraVideoTrack)
* [QNScreenVideoTrack](https://developer.qiniu.com/rtc/9452/qntrack/9448/QNScreenVideoTrack)
* [QNCustomVideoTrack](https://developer.qiniu.com/rtc/9452/qntrack/9412/QNCustomVideoTrack)
* [QNLocalAudioTrack](https://developer.qiniu.com/rtc/9452/qntrack/9420/QNLocalAudioTrack)
* [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/9452/qntrack/9433/QNMicrophoneAudioTrack)
* [QNCustomAudioTrack](https://developer.qiniu.com/rtc/9452/qntrack/9409/QNCustomAudioTrack)
* [QNRemoteTrack](https://developer.qiniu.com/rtc/9452/qntrack/9440/QNRemoteTrack)
* [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/9452/qntrack/9443/QNRemoteVideoTrack)
* [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/9452/qntrack/9438/QNRemoteAudioTrack)
Index
Core Methods
* GetTrackID
* GetUserID
* GetTag
* IsAudio
* IsVideo
* IsMuted
Core Methods
GetTrackID
* virtual const std::string& GetTrackID() = 0
* 获取 TrackID
Returns string
GetUserID
* virtual const std::string& GetUserID() = 0
* 获取 UserID
Returns string
GetTag
* virtual const std::string& GetTag() = 0
* 获取 Tag
Returns string
IsAudio
* virtual bool IsAudio() = 0
* 是否为音频 track
Returns bool
IsVideo
* virtual bool IsVideo() = 0
* 是否为视频 track
Returns bool
IsMuted
* virtual bool IsMuted() = 0
* 是否 muted
Returns bool
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows >QNTrack
# QNTrack
最近更新时间: 2022-03-23 23:25:36
音视频 Track 基类
Hierarchy
* QNTrack
* [QNLocalTrack](https://developer.qiniu.com/rtc/9452/qntrack/9422/QNLocalTrack)
* [QNLocalVideoTrack](https://developer.qiniu.com/rtc/9452/qntrack/9424/QNLocalVideoTrack)
* [QNCameraVideoTrack](https://developer.qiniu.com/rtc/9452/qntrack/9404/QNCameraVideoTrack)
* [QNScreenVideoTrack](https://developer.qiniu.com/rtc/9452/qntrack/9448/QNScreenVideoTrack)
* [QNCustomVideoTrack](https://developer.qiniu.com/rtc/9452/qntrack/9412/QNCustomVideoTrack)
* [QNLocalAudioTrack](https://developer.qiniu.com/rtc/9452/qntrack/9420/QNLocalAudioTrack)
* [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/9452/qntrack/9433/QNMicrophoneAudioTrack)
* [QNCustomAudioTrack](https://developer.qiniu.com/rtc/9452/qntrack/9409/QNCustomAudioTrack)
* [QNRemoteTrack](https://developer.qiniu.com/rtc/9452/qntrack/9440/QNRemoteTrack)
* [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/9452/qntrack/9443/QNRemoteVideoTrack)
* [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/9452/qntrack/9438/QNRemoteAudioTrack)
Index
Core Methods
* GetTrackID
* GetUserID
* GetTag
* IsAudio
* IsVideo
* IsMuted
Core Methods
GetTrackID
* virtual const std::string& GetTrackID() = 0
* 获取 TrackID
Returns string
GetUserID
* virtual const std::string& GetUserID() = 0
* 获取 UserID
Returns string
GetTag
* virtual const std::string& GetTag() = 0
* 获取 Tag
Returns string
IsAudio
* virtual bool IsAudio() = 0
* 是否为音频 track
Returns bool
IsVideo
* virtual bool IsVideo() = 0
* 是否为视频 track
Returns bool
IsMuted
* virtual bool IsMuted() = 0
* 是否 muted
Returns bool
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,644 |
QNTrackInfoChangedListener | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNTrackInfoChangedListener
# QNTrackInfoChangedListener
最近更新时间: 2022-03-23 23:26:40
Track 信息改变回调接口
Index
Core Methods
* OnVideoProfileChanged
* OnMuteStateChanged
Core Methods
OnVideoProfileChanged
* virtual void OnVideoProfileChanged(const std::string& user_id,const std::string& track_id,[QNTrackProfile](https://developer.qiniu.com/rtc/9453/qntrackinfochangedlistener/9454/QNTrackProfile) profile) = 0
* 视频 Track profile 改变后触发
Parameters
* user_id: string
切换 pofile 的被订阅用户 ID
* track_id: string
视频 track id
* profile: [QNTrackProfile](https://developer.qiniu.com/rtc/9453/qntrackinfochangedlistener/9454/QNTrackProfile)
当前改变后的 profile
OnMuteStateChanged
* virtual void OnMuteStateChanged(const std::string& user_id,const std::string& track_id,bool muted) = 0
* Track 静默状态改变后触发
Parameters
* user_id: string
是改变静默状态的远端用户 ID
* track_id: string
改变静默状态的远端 track id
* muted: bool
是否为静默状态
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNTrackInfoChangedListener
# QNTrackInfoChangedListener
最近更新时间: 2022-03-23 23:26:40
Track 信息改变回调接口
Index
Core Methods
* OnVideoProfileChanged
* OnMuteStateChanged
Core Methods
OnVideoProfileChanged
* virtual void OnVideoProfileChanged(const std::string& user_id,const std::string& track_id,[QNTrackProfile](https://developer.qiniu.com/rtc/9453/qntrackinfochangedlistener/9454/QNTrackProfile) profile) = 0
* 视频 Track profile 改变后触发
Parameters
* user_id: string
切换 pofile 的被订阅用户 ID
* track_id: string
视频 track id
* profile: [QNTrackProfile](https://developer.qiniu.com/rtc/9453/qntrackinfochangedlistener/9454/QNTrackProfile)
当前改变后的 profile
OnMuteStateChanged
* virtual void OnMuteStateChanged(const std::string& user_id,const std::string& track_id,bool muted) = 0
* Track 静默状态改变后触发
Parameters
* user_id: string
是改变静默状态的远端用户 ID
* track_id: string
改变静默状态的远端 track id
* muted: bool
是否为静默状态
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,647 |
QNTrackProfile | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows >QNTrackProfile
# QNTrackProfile
最近更新时间: 2022-03-23 23:27:07
Track 质量等级
Index
Enum
* QNTrackProfile
Enum
QNTrackProfile
* code | describe | message
---|---|---
kHigh | 高质量 | 无
kMedium | 普通质量 | 无
kLow | 低质量 | 无
Type declaration
* kHigh
* kMedium
* kLow
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows >QNTrackProfile
# QNTrackProfile
最近更新时间: 2022-03-23 23:27:07
Track 质量等级
Index
Enum
* QNTrackProfile
Enum
QNTrackProfile
* code | describe | message
---|---|---
kHigh | 高质量 | 无
kMedium | 普通质量 | 无
kLow | 低质量 | 无
Type declaration
* kHigh
* kMedium
* kLow
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,649 |
QNTranscodingLiveStreamingConfig | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNTranscodingLiveStreamingConfig
# QNTranscodingLiveStreamingConfig
最近更新时间: 2022-03-23 23:28:56
自定义合流配置信息
Index
Properties
* stream_id
* publish_url
* merge_background
* merge_watermark
* width
* height
* fps
* bitrate
* min_bitrate
* max_bitrate
* is_hold_last_frame
* stretch_mode
Properties
stream_id
* stream_id: string
* 流任务id,保证唯一
publish_url
* publish_url: string
* 自定义合流推流地址
merge_background
* merge_background: [QNTranscodingLiveStreamingImage](https://developer.qiniu.com/rtc/9456/qntranscodinglivestreamingconfig/9457/QNTranscodingLiveStreamingImage)
* 合流背景
merge_watermark
* merge_watermark: std::list<[QNTranscodingLiveStreamingImage](https://developer.qiniu.com/rtc/9456/qntranscodinglivestreamingconfig/9457/QNTranscodingLiveStreamingImage)>
* 合流水印
width
* width: int32_t
* 合流画布宽
height
* height: int32_t
* 合流画布高
fps
* fps: int32_t
* 合流帧率
bitrate
* bitrate: int32_t
* 合流码率 bps
min_bitrate
* min_bitrate: int32_t
* 最小码率
max_bitrate
* max_bitrate: int32_t
* 最大码率
is_hold_last_frame
* is_hold_last_frame: bool
* 合流停止时是否保持最后一帧画面
stretch_mode
* stretch_mode: [QNStretchMode](https://developer.qiniu.com/rtc/9456/qntranscodinglivestreamingconfig/9451/QNStretchMode)
* 合流画面填充模式
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNTranscodingLiveStreamingConfig
# QNTranscodingLiveStreamingConfig
最近更新时间: 2022-03-23 23:28:56
自定义合流配置信息
Index
Properties
* stream_id
* publish_url
* merge_background
* merge_watermark
* width
* height
* fps
* bitrate
* min_bitrate
* max_bitrate
* is_hold_last_frame
* stretch_mode
Properties
stream_id
* stream_id: string
* 流任务id,保证唯一
publish_url
* publish_url: string
* 自定义合流推流地址
merge_background
* merge_background: [QNTranscodingLiveStreamingImage](https://developer.qiniu.com/rtc/9456/qntranscodinglivestreamingconfig/9457/QNTranscodingLiveStreamingImage)
* 合流背景
merge_watermark
* merge_watermark: std::list<[QNTranscodingLiveStreamingImage](https://developer.qiniu.com/rtc/9456/qntranscodinglivestreamingconfig/9457/QNTranscodingLiveStreamingImage)>
* 合流水印
width
* width: int32_t
* 合流画布宽
height
* height: int32_t
* 合流画布高
fps
* fps: int32_t
* 合流帧率
bitrate
* bitrate: int32_t
* 合流码率 bps
min_bitrate
* min_bitrate: int32_t
* 最小码率
max_bitrate
* max_bitrate: int32_t
* 最大码率
is_hold_last_frame
* is_hold_last_frame: bool
* 合流停止时是否保持最后一帧画面
stretch_mode
* stretch_mode: [QNStretchMode](https://developer.qiniu.com/rtc/9456/qntranscodinglivestreamingconfig/9451/QNStretchMode)
* 合流画面填充模式
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,650 |
QNTranscodingLiveStreamingImage | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNTranscodingLiveStreamingImage
# QNTranscodingLiveStreamingImage
最近更新时间: 2022-03-23 23:28:02
合流背景、水印配置参数
Index
Properties
* layer_url
* x
* y
* layer_width
* layer_height
Properties
layer_url
* layer_url: string
* 合流背景、水印图片 http 网路地址
x
* x: int
* 在合流画面中的 x 坐标
y
* y: int
* 在合流画面中的 y 坐标
layer_width
* layer_width: int
* 该图片占宽
layer_height
* layer_height: int
* 该图片占高
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNTranscodingLiveStreamingImage
# QNTranscodingLiveStreamingImage
最近更新时间: 2022-03-23 23:28:02
合流背景、水印配置参数
Index
Properties
* layer_url
* x
* y
* layer_width
* layer_height
Properties
layer_url
* layer_url: string
* 合流背景、水印图片 http 网路地址
x
* x: int
* 在合流画面中的 x 坐标
y
* y: int
* 在合流画面中的 y 坐标
layer_width
* layer_width: int
* 该图片占宽
layer_height
* layer_height: int
* 该图片占高
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,652 |
QNTranscodingLiveStreamingTrack | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNTranscodingLiveStreamingTrack
# QNTranscodingLiveStreamingTrack
最近更新时间: 2022-03-23 23:29:37
旁路直播合流配置信息,通过 SDK 将参数发送到服务端,服务端按照指定的参数进行合流并推出 RTMP 流
Index
Properties
* track_id
* x
* y
* z
* width
* height
* stretch_mode
* is_support_sei
Properties
track_id
* track_id: string
* track id,房间内唯一
x
* x: int32_t
* 此路视频流(即此 video track)在 RTMP 流画布中的 X 坐标
y
* y: int32_t
* 此路视频流(即此 video track)在 RTMP 流画布中的 y 坐标
z
* z: int32_t
* 此路视频流(即此 video track)在 RTMP 流画布中的 z 坐标
width
* width: int32_t
* 此路视频流(即此 video track) RTMP 流画布中的宽度,缩放、裁减方式根据后端配置决定
height
* height: int32_t
* 此路视频流(即此 video track) RTMP 流画布中的高度,缩放、裁减方式根据后端配置决定
stretch_mode
* stretch_mode: [QNStretchMode](https://developer.qiniu.com/rtc/9458/qntranscodinglivestreamingtrack/9451/QNStretchMode)
* 设置video track 在合流时的填充模式,如果不做单独设置,填充模式将继承 StartLiveStreaming 的 stretchMode
is_support_sei
* is_support_sei: bool
* 是否支持私有 SEI 数据插入,只支持一路 video track 设置
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNTranscodingLiveStreamingTrack
# QNTranscodingLiveStreamingTrack
最近更新时间: 2022-03-23 23:29:37
旁路直播合流配置信息,通过 SDK 将参数发送到服务端,服务端按照指定的参数进行合流并推出 RTMP 流
Index
Properties
* track_id
* x
* y
* z
* width
* height
* stretch_mode
* is_support_sei
Properties
track_id
* track_id: string
* track id,房间内唯一
x
* x: int32_t
* 此路视频流(即此 video track)在 RTMP 流画布中的 X 坐标
y
* y: int32_t
* 此路视频流(即此 video track)在 RTMP 流画布中的 y 坐标
z
* z: int32_t
* 此路视频流(即此 video track)在 RTMP 流画布中的 z 坐标
width
* width: int32_t
* 此路视频流(即此 video track) RTMP 流画布中的宽度,缩放、裁减方式根据后端配置决定
height
* height: int32_t
* 此路视频流(即此 video track) RTMP 流画布中的高度,缩放、裁减方式根据后端配置决定
stretch_mode
* stretch_mode: [QNStretchMode](https://developer.qiniu.com/rtc/9458/qntranscodinglivestreamingtrack/9451/QNStretchMode)
* 设置video track 在合流时的填充模式,如果不做单独设置,填充模式将继承 StartLiveStreaming 的 stretchMode
is_support_sei
* is_support_sei: bool
* 是否支持私有 SEI 数据插入,只支持一路 video track 设置
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,653 |
QNTransportPolicy | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows >QNTransportPolicy
# QNTransportPolicy
最近更新时间: 2022-03-23 23:30:36
媒体传输协议配置
Index
Enum
* QNTransportPolicy
Enum
QNTransportPolicy
* code | describe | message
---|---|---
kForceUDP | 强制 UDP | 无
kForceTCP | 强制 TCP | 无
kPreferUDP | 优先 UDP | 默认为 kPreferUDP,当用户网络下 UDP 不通时,SDK 自动降级使用 TCP
Type declaration
* kForceUDP
* kForceTCP
* kPreferUDP
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows >QNTransportPolicy
# QNTransportPolicy
最近更新时间: 2022-03-23 23:30:36
媒体传输协议配置
Index
Enum
* QNTransportPolicy
Enum
QNTransportPolicy
* code | describe | message
---|---|---
kForceUDP | 强制 UDP | 无
kForceTCP | 强制 TCP | 无
kPreferUDP | 优先 UDP | 默认为 kPreferUDP,当用户网络下 UDP 不通时,SDK 自动降级使用 TCP
Type declaration
* kForceUDP
* kForceTCP
* kPreferUDP
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,655 |
QNVideoCaptureConfig | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNVideoCaptureConfig
# QNVideoCaptureConfig
最近更新时间: 2022-03-23 23:31:23
配置视频采集参数的结构体
Index
Properties
* width
* height
* frame_rate
Properties
width
* width: int32_t
* 设置视频采集宽度
height
* height: int32_t
* 设置视频采集高度
frame_rate
* frame_rate: int32_t
* 是视频采集帧率
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNVideoCaptureConfig
# QNVideoCaptureConfig
最近更新时间: 2022-03-23 23:31:23
配置视频采集参数的结构体
Index
Properties
* width
* height
* frame_rate
Properties
width
* width: int32_t
* 设置视频采集宽度
height
* height: int32_t
* 设置视频采集高度
frame_rate
* frame_rate: int32_t
* 是视频采集帧率
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,656 |
QNVideoDeviceState | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNVideoDeviceState
# QNVideoDeviceState
最近更新时间: 2022-03-23 23:31:51
摄像头设备状态,SDK 提供设备插拔状态的监控,以下用于标识设备被插入还是拔出设备状态变化后,建议通过
[GetCameraCount](https://developer.qiniu.com/rtc/9459/qnvideodevicestate/undefined)
重新获取摄像头设备列表
Index
Enum
* QNVideoDeviceState
Enum
QNVideoDeviceState
* code | describe | message
---|---|---
kVideoDeviceActive | 设备插入 | 无
kVideoDeviceLost | 设备拔出 | 无
Type declaration
* kVideoDeviceActive
* kVideoDeviceLost
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNVideoDeviceState
# QNVideoDeviceState
最近更新时间: 2022-03-23 23:31:51
摄像头设备状态,SDK 提供设备插拔状态的监控,以下用于标识设备被插入还是拔出设备状态变化后,建议通过
[GetCameraCount](https://developer.qiniu.com/rtc/9459/qnvideodevicestate/undefined)
重新获取摄像头设备列表
Index
Enum
* QNVideoDeviceState
Enum
QNVideoDeviceState
* code | describe | message
---|---|---
kVideoDeviceActive | 设备插入 | 无
kVideoDeviceLost | 设备拔出 | 无
Type declaration
* kVideoDeviceActive
* kVideoDeviceLost
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,657 |
QNVideoEncoderConfig | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNVideoEncoderConfig
# QNVideoEncoderConfig
最近更新时间: 2022-03-23 21:56:30
配置视频编码参数的结构体
Index
Properties
* width
* height
* frame_rate
* bitrate
Properties
width
* width: int32_t
* 设置视频编码宽度
height
* height: int32_t
* 设置视频编码高度
frame_rate
* frame_rate: int32_t
* 是视频编码帧率
bitrate
* bitrate: int32_t
* 是视频编码码率,单位 kbps
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNVideoEncoderConfig
# QNVideoEncoderConfig
最近更新时间: 2022-03-23 21:56:30
配置视频编码参数的结构体
Index
Properties
* width
* height
* frame_rate
* bitrate
Properties
width
* width: int32_t
* 设置视频编码宽度
height
* height: int32_t
* 设置视频编码高度
frame_rate
* frame_rate: int32_t
* 是视频编码帧率
bitrate
* bitrate: int32_t
* 是视频编码码率,单位 kbps
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,659 |
QNVideoEncodeType | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows >QNVideoEncodeType
# QNVideoEncodeType
最近更新时间: 2022-03-23 23:32:46
编码器类型
Index
Enum
* QNVideoEncodeType
Enum
QNVideoEncodeType
* code | describe | message
---|---|---
kEncodeOpenH264 | 默认 Open264 编码器,支持所有平台 | 无
kEncodeH264QSV | Intel 集显编码器,仅支持 Windows 平台 | 无
kEncodeH264NVENC | NVIDIA 独显编码器,仅支持 Windows 平台 | 无
kEncodeH264MobileHwCodec | 移动端硬编码器,仅支持 iOS/Android 平台 | 无
Type declaration
* kEncodeOpenH264
* kEncodeH264QSV
* kEncodeH264NVENC
* kEncodeH264MobileHwCodec
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows >QNVideoEncodeType
# QNVideoEncodeType
最近更新时间: 2022-03-23 23:32:46
编码器类型
Index
Enum
* QNVideoEncodeType
Enum
QNVideoEncodeType
* code | describe | message
---|---|---
kEncodeOpenH264 | 默认 Open264 编码器,支持所有平台 | 无
kEncodeH264QSV | Intel 集显编码器,仅支持 Windows 平台 | 无
kEncodeH264NVENC | NVIDIA 独显编码器,仅支持 Windows 平台 | 无
kEncodeH264MobileHwCodec | 移动端硬编码器,仅支持 iOS/Android 平台 | 无
Type declaration
* kEncodeOpenH264
* kEncodeH264QSV
* kEncodeH264NVENC
* kEncodeH264MobileHwCodec
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,660 |
QNVideoFrameListener | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNVideoFrameListener
# QNVideoFrameListener
最近更新时间: 2022-03-23 21:37:09
视频数据回调接口
Index
Core Methods
* OnVideoFrame
Core Methods
OnVideoFrame
* virtual void OnVideoFrame(const std::string& user_id,const string& track_id,const uint8_t* data,uint32_t data_size,int32_t width,int32_t height,QNVideoFrameType video_frame_type) = 0
* 音频数据回调
Parameters
* user_id: string
此视频数据所属的用户
* track_id: string
此音频 track id
* data: uint8_t*
视频数据内存指针
* data_size: uint32_t
数据长度
* width: int32_t
视频宽
* height: int32_t
视频高
* video_frame_type: [QNVideoFrameType](https://developer.qiniu.com/rtc/11326/qnvideoframelistener/11324/QNVideoFrameType)
视频数据类型
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows
>QNVideoFrameListener
# QNVideoFrameListener
最近更新时间: 2022-03-23 21:37:09
视频数据回调接口
Index
Core Methods
* OnVideoFrame
Core Methods
OnVideoFrame
* virtual void OnVideoFrame(const std::string& user_id,const string& track_id,const uint8_t* data,uint32_t data_size,int32_t width,int32_t height,QNVideoFrameType video_frame_type) = 0
* 音频数据回调
Parameters
* user_id: string
此视频数据所属的用户
* track_id: string
此音频 track id
* data: uint8_t*
视频数据内存指针
* data_size: uint32_t
数据长度
* width: int32_t
视频宽
* height: int32_t
视频高
* video_frame_type: [QNVideoFrameType](https://developer.qiniu.com/rtc/11326/qnvideoframelistener/11324/QNVideoFrameType)
视频数据类型
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,662 |
QNVideoFrameType | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows >QNVideoFrameType
# QNVideoFrameType
最近更新时间: 2022-03-23 21:26:11
视频数据格式
Index
Enum
* QNVideoFrameType
Enum
QNVideoFrameType
* Type declaration
* kUnknown
* kI420
* kIYUV
* kRGB24
* kABGR
* kARGB
* kARGB4444
* kRGB565
* kARGB1555
* kYUY2
* kYV12
* kUYVY
* kMJPEG
* kNV21
* kNV12
* kBGRA
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows >QNVideoFrameType
# QNVideoFrameType
最近更新时间: 2022-03-23 21:26:11
视频数据格式
Index
Enum
* QNVideoFrameType
Enum
QNVideoFrameType
* Type declaration
* kUnknown
* kI420
* kIYUV
* kRGB24
* kABGR
* kARGB
* kARGB4444
* kRGB565
* kARGB1555
* kYUY2
* kYV12
* kUYVY
* kMJPEG
* kNV21
* kNV12
* kBGRA
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,663 |
QNVideoRotation | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows >QNVideoRotation
# QNVideoRotation
最近更新时间: 2022-03-23 23:33:23
视频数据的旋转角度,主要用于对原始视频数据进行处理的功能接口中
Index
Enum
* QNVideoRotation
Enum
QNVideoRotation
* code | describe | message
---|---|---
kVideoRotation0 | 旋转 0 度 | 无
kVideoRotation90 | 旋转 90 度 | 无
kVideoRotation180 | 旋转 180 度 | 无
kVideoRotation270 | 旋转 270 度 | 无
Type declaration
* kVideoRotation0
* kVideoRotation90
* kVideoRotation180
* kVideoRotation270
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows >QNVideoRotation
# QNVideoRotation
最近更新时间: 2022-03-23 23:33:23
视频数据的旋转角度,主要用于对原始视频数据进行处理的功能接口中
Index
Enum
* QNVideoRotation
Enum
QNVideoRotation
* code | describe | message
---|---|---
kVideoRotation0 | 旋转 0 度 | 无
kVideoRotation90 | 旋转 90 度 | 无
kVideoRotation180 | 旋转 180 度 | 无
kVideoRotation270 | 旋转 270 度 | 无
Type declaration
* kVideoRotation0
* kVideoRotation90
* kVideoRotation180
* kVideoRotation270
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,664 |
QNView | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows >QNView
# QNView
最近更新时间: 2022-03-23 21:48:55
视频窗口及渲染模式设置
Index
Properties
* hwnd
* render_type
* rotation
* stretch_mode
* mirror
Properties
hwnd
* hwnd: void*
* 窗口对象, Windows:窗口句柄, iOS:UIView 窗口
render_type
* render_type: [QNRenderMode](https://developer.qiniu.com/rtc/11328/qnview/11327/QNRenderMode)
* 窗口渲染模式
rotation
* rotation: [QNVideoRotation](https://developer.qiniu.com/rtc/11328/qnview/9462/QNVideoRotation)
* 视频渲染时画面旋转角度
stretch_mode
* stretch_mode: [QNStretchMode](https://developer.qiniu.com/rtc/11328/qnview/9451/QNStretchMode)
* 渲染窗口画面填充模式
mirror
* mirror: bool
* 画面渲染时是否镜像
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Windows >QNView
# QNView
最近更新时间: 2022-03-23 21:48:55
视频窗口及渲染模式设置
Index
Properties
* hwnd
* render_type
* rotation
* stretch_mode
* mirror
Properties
hwnd
* hwnd: void*
* 窗口对象, Windows:窗口句柄, iOS:UIView 窗口
render_type
* render_type: [QNRenderMode](https://developer.qiniu.com/rtc/11328/qnview/11327/QNRenderMode)
* 窗口渲染模式
rotation
* rotation: [QNVideoRotation](https://developer.qiniu.com/rtc/11328/qnview/9462/QNVideoRotation)
* 视频渲染时画面旋转角度
stretch_mode
* stretch_mode: [QNStretchMode](https://developer.qiniu.com/rtc/11328/qnview/9451/QNStretchMode)
* 渲染窗口画面填充模式
mirror
* mirror: bool
* 画面渲染时是否镜像
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,665 |
QNAudioEffect | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNAudioEffect
# QNAudioEffect
最近更新时间: 2022-06-20 14:37:08
音效混音配置类,可通过
[QNAudioEffectMixer::CreateAudioEffect](https://developer.qiniu.com/rtc/11986/QNAudioEffect-
Linux/11987) 接口进行创建
Index
Core Methods
* GetDuration
* GetID
* GetFilePath
* SetStartPosition
* GetStartPosition
* SetLoopCount
* GetLoopCount
Core Methods
GetDuration
* static int64_t GetDuration(const std::string& file_path)
* 获取指定音效文件的时长,单位:ms
> 该接口为同步方法,对于在线音频文件,获取时长会存在一定的耗时,需注意调用接口所在的线程
Parameters
* file_path: string
音效文件路径
Returns 音效文件的时长,单位:ms
GetID
* virtual int GetID() = 0
* 获取音效文件的唯一标识符
Returns 音效文件的唯一标识符
GetFilePath
* virtual const std::string& GetFilePath() = 0
* 获取音效文件的路径
Returns 音效文件路径
SetStartPosition
* virtual void SetStartPosition(int64_t start_pos) = 0
* 设置音效混音的初始位置
Parameters
* start_pos: int
混音位置,单位:ms
GetStartPosition
* virtual int64_t GetStartPosition() = 0
* 获取音效混音的初始位置
Returns 音效混音初始位置,单位:ms
SetLoopCount
* virtual void SetLoopCount(int loop_count) = 0
* 设置音效混音的循环次数
Parameters
* loopCount: int
循环次数,-1 为无限循环,0 则不做混音,其他则为指定次数的混音
GetLoopCount
* virtual int GetLoopCount() = 0
* 获取音效混音的循环次数
Returns 循环次数
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNAudioEffect
# QNAudioEffect
最近更新时间: 2022-06-20 14:37:08
音效混音配置类,可通过
[QNAudioEffectMixer::CreateAudioEffect](https://developer.qiniu.com/rtc/11986/QNAudioEffect-
Linux/11987) 接口进行创建
Index
Core Methods
* GetDuration
* GetID
* GetFilePath
* SetStartPosition
* GetStartPosition
* SetLoopCount
* GetLoopCount
Core Methods
GetDuration
* static int64_t GetDuration(const std::string& file_path)
* 获取指定音效文件的时长,单位:ms
> 该接口为同步方法,对于在线音频文件,获取时长会存在一定的耗时,需注意调用接口所在的线程
Parameters
* file_path: string
音效文件路径
Returns 音效文件的时长,单位:ms
GetID
* virtual int GetID() = 0
* 获取音效文件的唯一标识符
Returns 音效文件的唯一标识符
GetFilePath
* virtual const std::string& GetFilePath() = 0
* 获取音效文件的路径
Returns 音效文件路径
SetStartPosition
* virtual void SetStartPosition(int64_t start_pos) = 0
* 设置音效混音的初始位置
Parameters
* start_pos: int
混音位置,单位:ms
GetStartPosition
* virtual int64_t GetStartPosition() = 0
* 获取音效混音的初始位置
Returns 音效混音初始位置,单位:ms
SetLoopCount
* virtual void SetLoopCount(int loop_count) = 0
* 设置音效混音的循环次数
Parameters
* loopCount: int
循环次数,-1 为无限循环,0 则不做混音,其他则为指定次数的混音
GetLoopCount
* virtual int GetLoopCount() = 0
* 获取音效混音的循环次数
Returns 循环次数
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,666 |
QNAudioEffectMixer | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNAudioEffectMixer
# QNAudioEffectMixer
最近更新时间: 2022-06-20 14:40:28
音效混音控制类,提供了控制音效混音的一系列方法。
> 1\. 当前仅支持基于
> [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11987/QNAudioEffectMixer-
> Linux/11210/QNMicrophoneAudioTrack) 的音效混音操作
>
> 2\. 混音需要加入房间并且成功发布后才会生效,因此,需要注意调用的时机
Index
Core Methods
* CreateAudioEffect
* DestroyAudioEffect
* Start
* Stop
* Pause
* Resume
* StopAll
* PauseAll
* ResumeAll
* GetCurrentPosition
* SetVolume
* GetVolume
* SetAllEffectsVolume
Core Methods
CreateAudioEffect
* virtual [QNAudioEffect](https://developer.qiniu.com/rtc/11987/QNAudioEffectMixer-Linux/11986/QNAudioEffect)* CreateAudioEffect(int effect_id, const std::string& file_path) = 0
* 创建音效混音配置类实例,每一路参与混音的音效都需要对应一个 [QNAudioEffect](https://developer.qiniu.com/rtc/11987/QNAudioEffectMixer-Linux/11986/QNAudioEffect) 实例
> 支持本地和在线文件,支持的文件格式为:aac、mp3、mp4、ogg、opus、wav、m4a、flac
Parameters
* effect_id: int
音效文件的唯一标识符,需自行生成并维护,且确保唯一
* file_path: string
音效文件地址,支持本地文件和在线文件
Returns 音效混音实例指针
DestroyAudioEffect
* virtual void DestroyAudioEffect([QNAudioEffect](https://developer.qiniu.com/rtc/11987/QNAudioEffectMixer-Linux/11986/QNAudioEffect)* ptr) = 0
* 销毁 [QNAudioEffect](https://developer.qiniu.com/rtc/11987/QNAudioEffectMixer-Linux/11986/QNAudioEffect)* 实例指针
Parameters
* ptr: [QNAudioEffect](https://developer.qiniu.com/rtc/11987/QNAudioEffectMixer-Linux/11986/QNAudioEffect)*
音效混音实例指针
Start
* virtual bool Start(int effect_id) = 0
* 开始音效混音
混音的次数可以通过
[QNAudioEffect.SetLoopCount](https://developer.qiniu.com/rtc/11987/QNAudioEffectMixer-
Linux/11986) 接口配置
混音结束时会触发
[QNAudioEffectMixerListener.OnAudioEffectFinished](https://developer.qiniu.com/rtc/11987/QNAudioEffectMixer-
Linux/11988) 回调
混音出错会触发
[QNAudioEffectMixerListener.OnAudioEffectMixerError](https://developer.qiniu.com/rtc/11987/QNAudioEffectMixer-
Linux/11988) 回调
Parameters
* effect_id: int
音效文件的唯一标识符
Returns 接口是否调用成功
Stop
* virtual bool Stop(int effect_id) = 0
* 停止音效混音
Parameters
* effect_id: int
音效文件的唯一标识符
Returns 接口是否调用成功
Pause
* virtual bool Pause(int effect_id) = 0
* 暂停音效混音
Parameters
* effect_id: int
音效文件的唯一标识符
Returns 接口是否调用成功
Resume
* virtual bool Resume(int effect_id) = 0
* 恢复音效混音
Parameters
* effect_id: int
音效文件的唯一标识符
Returns 接口是否调用成功
StopAll
* virtual bool StopAll() = 0
* 停止所有正在混音的音效
Returns 接口是否调用成功
PauseAll
* virtual bool PauseAll() = 0
* 暂停所有正在混音的音效
Returns 接口是否调用成功
ResumeAll
* virtual bool ResumeAll() = 0
* 恢复所有暂停混音的音效
Returns 接口是否调用成功
GetCurrentPosition
* virtual int64_t GetCurrentPosition(int effect_id) = 0
* 获取指定音效混音的位置,单位: ms
Parameters
* effect_id: int
音效文件的唯一标识符
Returns 指定音效混音的位置,单位: ms
SetVolume
* virtual void SetVolume(int effect_id, float volume) = 0
* 设置指定音效的混音音量,默认音量为 1.0f
> 若想修改混音中麦克风采集音频的音量,可通过
> [QNMicrophoneAudioTrack.SetVolume](https://developer.qiniu.com/rtc/11987/QNAudioEffectMixer-
> Linux/11210) 接口实现
Parameters
* effect_id: int
音效文件的唯一标识符
* volume: float
音效的混音音量,[0.0f - 1.0f]
GetVolume
* virtual float GetVolume(int effect_id) = 0
* 获取指定音效的混音音量
Parameters
* effect_id: int
音效文件的唯一标识符
Returns 指定音效的混音音量,[0.0f - 1.0f]
SetAllEffectsVolume
* virtual void SetAllEffectsVolume(float volume) = 0
* 设置所有正在混音的音效的混音音量
Parameters
* volume: float
音效的混音音量,[0.0f - 1.0f]
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNAudioEffectMixer
# QNAudioEffectMixer
最近更新时间: 2022-06-20 14:40:28
音效混音控制类,提供了控制音效混音的一系列方法。
> 1\. 当前仅支持基于
> [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11987/QNAudioEffectMixer-
> Linux/11210/QNMicrophoneAudioTrack) 的音效混音操作
>
> 2\. 混音需要加入房间并且成功发布后才会生效,因此,需要注意调用的时机
Index
Core Methods
* CreateAudioEffect
* DestroyAudioEffect
* Start
* Stop
* Pause
* Resume
* StopAll
* PauseAll
* ResumeAll
* GetCurrentPosition
* SetVolume
* GetVolume
* SetAllEffectsVolume
Core Methods
CreateAudioEffect
* virtual [QNAudioEffect](https://developer.qiniu.com/rtc/11987/QNAudioEffectMixer-Linux/11986/QNAudioEffect)* CreateAudioEffect(int effect_id, const std::string& file_path) = 0
* 创建音效混音配置类实例,每一路参与混音的音效都需要对应一个 [QNAudioEffect](https://developer.qiniu.com/rtc/11987/QNAudioEffectMixer-Linux/11986/QNAudioEffect) 实例
> 支持本地和在线文件,支持的文件格式为:aac、mp3、mp4、ogg、opus、wav、m4a、flac
Parameters
* effect_id: int
音效文件的唯一标识符,需自行生成并维护,且确保唯一
* file_path: string
音效文件地址,支持本地文件和在线文件
Returns 音效混音实例指针
DestroyAudioEffect
* virtual void DestroyAudioEffect([QNAudioEffect](https://developer.qiniu.com/rtc/11987/QNAudioEffectMixer-Linux/11986/QNAudioEffect)* ptr) = 0
* 销毁 [QNAudioEffect](https://developer.qiniu.com/rtc/11987/QNAudioEffectMixer-Linux/11986/QNAudioEffect)* 实例指针
Parameters
* ptr: [QNAudioEffect](https://developer.qiniu.com/rtc/11987/QNAudioEffectMixer-Linux/11986/QNAudioEffect)*
音效混音实例指针
Start
* virtual bool Start(int effect_id) = 0
* 开始音效混音
混音的次数可以通过
[QNAudioEffect.SetLoopCount](https://developer.qiniu.com/rtc/11987/QNAudioEffectMixer-
Linux/11986) 接口配置
混音结束时会触发
[QNAudioEffectMixerListener.OnAudioEffectFinished](https://developer.qiniu.com/rtc/11987/QNAudioEffectMixer-
Linux/11988) 回调
混音出错会触发
[QNAudioEffectMixerListener.OnAudioEffectMixerError](https://developer.qiniu.com/rtc/11987/QNAudioEffectMixer-
Linux/11988) 回调
Parameters
* effect_id: int
音效文件的唯一标识符
Returns 接口是否调用成功
Stop
* virtual bool Stop(int effect_id) = 0
* 停止音效混音
Parameters
* effect_id: int
音效文件的唯一标识符
Returns 接口是否调用成功
Pause
* virtual bool Pause(int effect_id) = 0
* 暂停音效混音
Parameters
* effect_id: int
音效文件的唯一标识符
Returns 接口是否调用成功
Resume
* virtual bool Resume(int effect_id) = 0
* 恢复音效混音
Parameters
* effect_id: int
音效文件的唯一标识符
Returns 接口是否调用成功
StopAll
* virtual bool StopAll() = 0
* 停止所有正在混音的音效
Returns 接口是否调用成功
PauseAll
* virtual bool PauseAll() = 0
* 暂停所有正在混音的音效
Returns 接口是否调用成功
ResumeAll
* virtual bool ResumeAll() = 0
* 恢复所有暂停混音的音效
Returns 接口是否调用成功
GetCurrentPosition
* virtual int64_t GetCurrentPosition(int effect_id) = 0
* 获取指定音效混音的位置,单位: ms
Parameters
* effect_id: int
音效文件的唯一标识符
Returns 指定音效混音的位置,单位: ms
SetVolume
* virtual void SetVolume(int effect_id, float volume) = 0
* 设置指定音效的混音音量,默认音量为 1.0f
> 若想修改混音中麦克风采集音频的音量,可通过
> [QNMicrophoneAudioTrack.SetVolume](https://developer.qiniu.com/rtc/11987/QNAudioEffectMixer-
> Linux/11210) 接口实现
Parameters
* effect_id: int
音效文件的唯一标识符
* volume: float
音效的混音音量,[0.0f - 1.0f]
GetVolume
* virtual float GetVolume(int effect_id) = 0
* 获取指定音效的混音音量
Parameters
* effect_id: int
音效文件的唯一标识符
Returns 指定音效的混音音量,[0.0f - 1.0f]
SetAllEffectsVolume
* virtual void SetAllEffectsVolume(float volume) = 0
* 设置所有正在混音的音效的混音音量
Parameters
* volume: float
音效的混音音量,[0.0f - 1.0f]
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,668 |
QNAudioEffectMixerListener | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNAudioEffectMixerListener
# QNAudioEffectMixerListener
最近更新时间: 2022-06-20 14:43:50
音效混音控制器的回调监听函数,可以通过
[QNMicrophoneAudioTrack::CreateAudioEffectMixer](https://developer.qiniu.com/rtc/11988/QNAudioEffectMixerListener-
Linux/11210) 创建
[QNAudioEffectMixer](https://developer.qiniu.com/rtc/11988/QNAudioEffectMixerListener-
Linux/11987/QNAudioEffectMixer) 时传入。
Index
Core Methods
* OnAudioEffectFinished
* OnAudioEffectMixerError
Core Methods
OnAudioEffectFinished
* virtual void OnAudioEffectFinished(int effect_id) = 0
* 音效混音完成时触发此回调
Parameters
* effect_id: int
音效文件的唯一标识符
OnAudioEffectMixerError
* virtual void OnAudioEffectMixerError(int error_code,const std::string& error_message) = 0
* 音效混音发生错误时会触发此回调
code | describe | message
---|---|---
Err_Audio_Mixing_Audio_Not_Found | 混音源没有找到有效音轨 | 请检查混音文件的合法性
Err_Audio_Mixing_Decoder_Exception | 系统不支持混音源中的音频类型 | 支持的音频文件格式为:aac、mp3、mp4、ogg、opus、wav、m4a、flac
Err_Audio_Mixing_Seek_Failed | seek 失败 | 请检查是否在开始混音前执行了 Seek 操作
Err_Audio_Mixing_Resample_Failed | 重采样模块创建失败 | 请重新尝试混音操作
Err_Audio_Mixing_IO_Exception | 混音源文件 IO 错误 | 请检查混音源文件是否存在异常
Parameters
* error_code: int
混音异常时对应的错误码
* error_message: string
混音异常时对应的错误信息
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNAudioEffectMixerListener
# QNAudioEffectMixerListener
最近更新时间: 2022-06-20 14:43:50
音效混音控制器的回调监听函数,可以通过
[QNMicrophoneAudioTrack::CreateAudioEffectMixer](https://developer.qiniu.com/rtc/11988/QNAudioEffectMixerListener-
Linux/11210) 创建
[QNAudioEffectMixer](https://developer.qiniu.com/rtc/11988/QNAudioEffectMixerListener-
Linux/11987/QNAudioEffectMixer) 时传入。
Index
Core Methods
* OnAudioEffectFinished
* OnAudioEffectMixerError
Core Methods
OnAudioEffectFinished
* virtual void OnAudioEffectFinished(int effect_id) = 0
* 音效混音完成时触发此回调
Parameters
* effect_id: int
音效文件的唯一标识符
OnAudioEffectMixerError
* virtual void OnAudioEffectMixerError(int error_code,const std::string& error_message) = 0
* 音效混音发生错误时会触发此回调
code | describe | message
---|---|---
Err_Audio_Mixing_Audio_Not_Found | 混音源没有找到有效音轨 | 请检查混音文件的合法性
Err_Audio_Mixing_Decoder_Exception | 系统不支持混音源中的音频类型 | 支持的音频文件格式为:aac、mp3、mp4、ogg、opus、wav、m4a、flac
Err_Audio_Mixing_Seek_Failed | seek 失败 | 请检查是否在开始混音前执行了 Seek 操作
Err_Audio_Mixing_Resample_Failed | 重采样模块创建失败 | 请重新尝试混音操作
Err_Audio_Mixing_IO_Exception | 混音源文件 IO 错误 | 请检查混音源文件是否存在异常
Parameters
* error_code: int
混音异常时对应的错误码
* error_message: string
混音异常时对应的错误信息
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,673 |
QNAudioMusicMixer | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNAudioMusicMixer
# QNAudioMusicMixer
最近更新时间: 2022-06-20 14:44:58
背景音乐混音控制类,提供了控制背景音乐混音一系列方法。
> 1\. 当前仅支持基于
> [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
> Linux/11210/QNMicrophoneAudioTrack) 的背景音乐混音操作
>
> 2\. 混音需要加入房间并且成功发布后才会生效,因此,需要注意调用的时机
>
> 3\. 背景音乐混音仅支持同时混合一路背景音乐,若需要切换背景音乐,重新调用
> [QNMicrophoneAudioTrack.CreateAudioMusicMixer](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
> Linux/11210) 创建本类的实例即可
>
> 4\.
> 若您希望在混合背景音乐的同时添加音效,可参考音效混音接口([QNAudioEffectMixer](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
> Linux/11987/QNAudioEffectMixer))
Index
Core Methods
* GetDuration
* Start[1/2]
* Start[2/2]
* Stop
* Resume
* Pause
* GetCurrentPosition
* SeekTo
* SetMixingVolume
* GetMixingVolume
* SetStartPosition
* GetStartPosition
Core Methods
GetDuration
* static int64_t GetDuration(const std::string& file_path)
* 获取指定音频文件的总时长,单位:ms
> 该接口为同步方法,对于在线音频文件,获取时长会存在一定的耗时,需注意调用接口所在的线程
Returns 音频文件总时长,单位:ms
Start[1/2]
* virtual bool Start() = 0
* 开始混音并播放,音频只混一次,不做循环混音操作
混音开始后会触发
[QNAudioMusicMixerListener.OnAudioMusicMixerStateChanged](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11988) 回调,并回调
[QNMusicMixerState.kStateMixing](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11991) 状态
混音过程中会回调
[QNAudioMusicMixerListener.OnAudioMusicMixing](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11988) 方法
Start[2/2]
* virtual bool Start(int loop_count) = 0
* 开始指定次数的混音并播放
混音开始后会触发
[QNAudioMusicMixerListener.OnAudioMusicMixerStateChanged](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11988) 回调,并回调
[QNMusicMixerState.kStateMixing](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11991) 状态
混音过程中会回调
[QNAudioMusicMixerListener.OnAudioMusicMixing](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11988) 方法
Parameters
* loop_count: int
混音次数,-1 为无限循环,0 则不做混音,其他则为指定次数的混音
Stop
* virtual bool Stop() = 0
* 停止混音操作
混音停止后会触发
[QNAudioMusicMixerListener.OnAudioMusicMixerStateChanged](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11988) 回调,并回调
[QNMusicMixerState.kStateStopped](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11991) 状态
Resume
* virtual bool Resume() = 0
* 恢复混音操作
混音恢复后会触发
[QNAudioMusicMixerListener.OnAudioMusicMixerStateChanged](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11988) 回调,并回调
[QNMusicMixerState.kStateMixing](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11991) 状态
Pause
* virtual bool Pause() = 0
* 暂停混音操作
混音暂停后会触发
[QNAudioMusicMixerListener.OnAudioMusicMixerStateChanged](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11988) 回调,并回调
[QNMusicMixerState.kStatePaused](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11991) 状态
GetCurrentPosition
* virtual int64_t GetCurrentPosition() = 0
* 获取当前音频混音的位置,单位: ms
Returns 当前音频混音的位置,单位: ms
SeekTo
* virtual bool SeekTo(int64_t seek_pos) = 0
* 跳到指定位置混音
成功跳到指定位置混音后会触发
[QNAudioMusicMixerListener.OnAudioMusicMixerStateChanged](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11988) 回调,并回调
[QNMusicMixerState.kStateMixing](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11991) 状态
Parameters
* seek_pos: int64_t
指定位置的时间戳,单位: ms
SetMixingVolume
* virtual void SetMixingVolume(float mix_volume) = 0
* 设置背景音乐的混音音量,默认音量为 1.0f
> 若想修改混音中麦克风采集音频的音量,可通过
> [QNMicrophoneAudioTrack.SetVolume](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
> Linux/11210) 接口实现
Parameters
* mix_volume: float
背景音乐混音音量,[0.0f - 1.0f]
GetMixingVolume
* virtual float GetMixingVolume() = 0
* 获取背景音乐混音的音量
Returns 背景音乐混音的音量,[0.0f - 1.0f]
SetStartPosition
* virtual void SetStartPosition(int64_t start_pos) = 0
* 设置背景音乐混音的起始位置,起始位置的有效值为 0 - duration 之间的值
Parameters
* start_pos: int64_t
背景音乐混音的起始位置,单位:ms
GetStartPosition
* virtual int64_t GetStartPosition() = 0
* 获取背景音乐混音的起始位置
Returns 背景音乐混音的起始位置,单位:ms
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNAudioMusicMixer
# QNAudioMusicMixer
最近更新时间: 2022-06-20 14:44:58
背景音乐混音控制类,提供了控制背景音乐混音一系列方法。
> 1\. 当前仅支持基于
> [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
> Linux/11210/QNMicrophoneAudioTrack) 的背景音乐混音操作
>
> 2\. 混音需要加入房间并且成功发布后才会生效,因此,需要注意调用的时机
>
> 3\. 背景音乐混音仅支持同时混合一路背景音乐,若需要切换背景音乐,重新调用
> [QNMicrophoneAudioTrack.CreateAudioMusicMixer](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
> Linux/11210) 创建本类的实例即可
>
> 4\.
> 若您希望在混合背景音乐的同时添加音效,可参考音效混音接口([QNAudioEffectMixer](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
> Linux/11987/QNAudioEffectMixer))
Index
Core Methods
* GetDuration
* Start[1/2]
* Start[2/2]
* Stop
* Resume
* Pause
* GetCurrentPosition
* SeekTo
* SetMixingVolume
* GetMixingVolume
* SetStartPosition
* GetStartPosition
Core Methods
GetDuration
* static int64_t GetDuration(const std::string& file_path)
* 获取指定音频文件的总时长,单位:ms
> 该接口为同步方法,对于在线音频文件,获取时长会存在一定的耗时,需注意调用接口所在的线程
Returns 音频文件总时长,单位:ms
Start[1/2]
* virtual bool Start() = 0
* 开始混音并播放,音频只混一次,不做循环混音操作
混音开始后会触发
[QNAudioMusicMixerListener.OnAudioMusicMixerStateChanged](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11988) 回调,并回调
[QNMusicMixerState.kStateMixing](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11991) 状态
混音过程中会回调
[QNAudioMusicMixerListener.OnAudioMusicMixing](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11988) 方法
Start[2/2]
* virtual bool Start(int loop_count) = 0
* 开始指定次数的混音并播放
混音开始后会触发
[QNAudioMusicMixerListener.OnAudioMusicMixerStateChanged](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11988) 回调,并回调
[QNMusicMixerState.kStateMixing](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11991) 状态
混音过程中会回调
[QNAudioMusicMixerListener.OnAudioMusicMixing](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11988) 方法
Parameters
* loop_count: int
混音次数,-1 为无限循环,0 则不做混音,其他则为指定次数的混音
Stop
* virtual bool Stop() = 0
* 停止混音操作
混音停止后会触发
[QNAudioMusicMixerListener.OnAudioMusicMixerStateChanged](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11988) 回调,并回调
[QNMusicMixerState.kStateStopped](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11991) 状态
Resume
* virtual bool Resume() = 0
* 恢复混音操作
混音恢复后会触发
[QNAudioMusicMixerListener.OnAudioMusicMixerStateChanged](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11988) 回调,并回调
[QNMusicMixerState.kStateMixing](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11991) 状态
Pause
* virtual bool Pause() = 0
* 暂停混音操作
混音暂停后会触发
[QNAudioMusicMixerListener.OnAudioMusicMixerStateChanged](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11988) 回调,并回调
[QNMusicMixerState.kStatePaused](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11991) 状态
GetCurrentPosition
* virtual int64_t GetCurrentPosition() = 0
* 获取当前音频混音的位置,单位: ms
Returns 当前音频混音的位置,单位: ms
SeekTo
* virtual bool SeekTo(int64_t seek_pos) = 0
* 跳到指定位置混音
成功跳到指定位置混音后会触发
[QNAudioMusicMixerListener.OnAudioMusicMixerStateChanged](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11988) 回调,并回调
[QNMusicMixerState.kStateMixing](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
Linux/11991) 状态
Parameters
* seek_pos: int64_t
指定位置的时间戳,单位: ms
SetMixingVolume
* virtual void SetMixingVolume(float mix_volume) = 0
* 设置背景音乐的混音音量,默认音量为 1.0f
> 若想修改混音中麦克风采集音频的音量,可通过
> [QNMicrophoneAudioTrack.SetVolume](https://developer.qiniu.com/rtc/11989/QNAudioMusicMixer-
> Linux/11210) 接口实现
Parameters
* mix_volume: float
背景音乐混音音量,[0.0f - 1.0f]
GetMixingVolume
* virtual float GetMixingVolume() = 0
* 获取背景音乐混音的音量
Returns 背景音乐混音的音量,[0.0f - 1.0f]
SetStartPosition
* virtual void SetStartPosition(int64_t start_pos) = 0
* 设置背景音乐混音的起始位置,起始位置的有效值为 0 - duration 之间的值
Parameters
* start_pos: int64_t
背景音乐混音的起始位置,单位:ms
GetStartPosition
* virtual int64_t GetStartPosition() = 0
* 获取背景音乐混音的起始位置
Returns 背景音乐混音的起始位置,单位:ms
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,676 |
QNAudioMusicMixerListener | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNAudioMusicMixerListener
# QNAudioMusicMixerListener
最近更新时间: 2022-06-20 14:46:43
混音过程中的回调监听函数,可以通过
[QNMicrophoneAudioTrack.CreateAudioMusicMixer](https://developer.qiniu.com/rtc/11990/QNAudioMusicMixerListener-
Linux/11210) 创建
[QNAudioMusicMixer](https://developer.qiniu.com/rtc/11990/QNAudioMusicMixerListener-
Linux/11987/QNAudioMusicMixer) 时传入
Index
Core Methods
* OnAudioMusicMixerStateChanged
* OnAudioMusicMixing
* OnAudioMusicMixerError
Core Methods
OnAudioMusicMixerStateChanged
* virtual void OnAudioMusicMixerStateChanged(QNMusicMixerState music_state) = 0
* 混音状态改变时触发此回调
>
> [QNAudioMusicMixer.SeekTo](https://developer.qiniu.com/rtc/11990/QNAudioMusicMixerListener-
> Linux/11987) 操作成功后会触发
> [QNMusicMixerState.kStateMixing](https://developer.qiniu.com/rtc/11990/QNAudioMusicMixerListener-
> Linux/11991) 状态的回调
Parameters
* music_state: [QNMusicMixerState](https://developer.qiniu.com/rtc/11990/QNAudioMusicMixerListener-Linux/11991/QNMusicMixerState)
当前的混音状态
OnAudioMusicMixing
* virtual void OnAudioMusicMixing(int64_t current_pos) = 0
* 混音操作进行过程中会不断触发此回调
Parameters
* current_pos: int64_t
当前正在执行混音操作的音频帧时间戳,单位: ms
OnAudioMusicMixerError
* virtual void OnAudioMusicMixerError(int error_code, const std::string& error_message) = 0
* 混音操作发生错误时会触发此回调
code | describe | message
---|---|---
Err_Audio_Mixing_Audio_Not_Found | 混音源没有找到有效音轨 | 请检查混音文件的合法性
Err_Audio_Mixing_Decoder_Exception | 系统不支持混音源中的音频类型 | 支持的音频文件格式为:aac、mp3、mp4、ogg、opus、wav、m4a、flac
Err_Audio_Mixing_Seek_Failed | seek 失败 | 请检查是否在开始混音前执行了 Seek 操作
Err_Audio_Mixing_Resample_Failed | 重采样模块创建失败 | 请重新尝试混音操作
Err_Audio_Mixing_IO_Exception | 混音源文件 IO 错误 | 请检查混音源文件是否存在异常
Parameters
* error_code: int
混音异常时对应的错误码
* error_message: string
混音异常时对应的错误信息
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNAudioMusicMixerListener
# QNAudioMusicMixerListener
最近更新时间: 2022-06-20 14:46:43
混音过程中的回调监听函数,可以通过
[QNMicrophoneAudioTrack.CreateAudioMusicMixer](https://developer.qiniu.com/rtc/11990/QNAudioMusicMixerListener-
Linux/11210) 创建
[QNAudioMusicMixer](https://developer.qiniu.com/rtc/11990/QNAudioMusicMixerListener-
Linux/11987/QNAudioMusicMixer) 时传入
Index
Core Methods
* OnAudioMusicMixerStateChanged
* OnAudioMusicMixing
* OnAudioMusicMixerError
Core Methods
OnAudioMusicMixerStateChanged
* virtual void OnAudioMusicMixerStateChanged(QNMusicMixerState music_state) = 0
* 混音状态改变时触发此回调
>
> [QNAudioMusicMixer.SeekTo](https://developer.qiniu.com/rtc/11990/QNAudioMusicMixerListener-
> Linux/11987) 操作成功后会触发
> [QNMusicMixerState.kStateMixing](https://developer.qiniu.com/rtc/11990/QNAudioMusicMixerListener-
> Linux/11991) 状态的回调
Parameters
* music_state: [QNMusicMixerState](https://developer.qiniu.com/rtc/11990/QNAudioMusicMixerListener-Linux/11991/QNMusicMixerState)
当前的混音状态
OnAudioMusicMixing
* virtual void OnAudioMusicMixing(int64_t current_pos) = 0
* 混音操作进行过程中会不断触发此回调
Parameters
* current_pos: int64_t
当前正在执行混音操作的音频帧时间戳,单位: ms
OnAudioMusicMixerError
* virtual void OnAudioMusicMixerError(int error_code, const std::string& error_message) = 0
* 混音操作发生错误时会触发此回调
code | describe | message
---|---|---
Err_Audio_Mixing_Audio_Not_Found | 混音源没有找到有效音轨 | 请检查混音文件的合法性
Err_Audio_Mixing_Decoder_Exception | 系统不支持混音源中的音频类型 | 支持的音频文件格式为:aac、mp3、mp4、ogg、opus、wav、m4a、flac
Err_Audio_Mixing_Seek_Failed | seek 失败 | 请检查是否在开始混音前执行了 Seek 操作
Err_Audio_Mixing_Resample_Failed | 重采样模块创建失败 | 请重新尝试混音操作
Err_Audio_Mixing_IO_Exception | 混音源文件 IO 错误 | 请检查混音源文件是否存在异常
Parameters
* error_code: int
混音异常时对应的错误码
* error_message: string
混音异常时对应的错误信息
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,682 |
QNMusicMixerState | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNMusicMixerState
# QNMusicMixerState
最近更新时间: 2022-06-20 14:49:01
背景音乐混音相关的回调状态,通过
[QNAudioMusicMixerListener.OnAudioMusicMixerStateChanged](https://developer.qiniu.com/rtc/11991/QNMusicMixerState-
Linux/11990) 接口回调
Index
Properties
* kStateIdle
* kStateMixing
* kStatePaused
* kStateStopped
* kStateCompleted
Properties
kStateIdle
* kStateIdle: QNMusicMixerState
* 混音控制器的初始状态
kStateMixing
* kStateMixing: QNMusicMixerState
* 混音操作进行中的状态
当成功执行
[QNAudioMusicMixer.Start](https://developer.qiniu.com/rtc/11991/QNMusicMixerState-
Linux/11989)、[QNAudioMusicMixer.Resume](https://developer.qiniu.com/rtc/11991/QNMusicMixerState-
Linux/11989) 或者
[QNAudioMusicMixer.SeekTo](https://developer.qiniu.com/rtc/11991/QNMusicMixerState-
Linux/11989) 后,会回调此状态
kStatePaused
* kStatePaused: QNMusicMixerState
* 混音操作暂停时的状态
当成功执行
[QNAudioMusicMixer.Pause](https://developer.qiniu.com/rtc/11991/QNMusicMixerState-
Linux/11989) 后,会回调此状态
kStateStopped
* kStateStopped: QNMusicMixerState
* 混音操作停止时的状态
当成功执行
[QNAudioMusicMixer.Stop](https://developer.qiniu.com/rtc/11991/QNMusicMixerState-
Linux/11989) 后,会回调此状态
kStateCompleted
* kStateCompleted: QNMusicMixerState
* 混音操作完成时的状态
> 当且仅当指定循环次数混音完成后,会回调此状态
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNMusicMixerState
# QNMusicMixerState
最近更新时间: 2022-06-20 14:49:01
背景音乐混音相关的回调状态,通过
[QNAudioMusicMixerListener.OnAudioMusicMixerStateChanged](https://developer.qiniu.com/rtc/11991/QNMusicMixerState-
Linux/11990) 接口回调
Index
Properties
* kStateIdle
* kStateMixing
* kStatePaused
* kStateStopped
* kStateCompleted
Properties
kStateIdle
* kStateIdle: QNMusicMixerState
* 混音控制器的初始状态
kStateMixing
* kStateMixing: QNMusicMixerState
* 混音操作进行中的状态
当成功执行
[QNAudioMusicMixer.Start](https://developer.qiniu.com/rtc/11991/QNMusicMixerState-
Linux/11989)、[QNAudioMusicMixer.Resume](https://developer.qiniu.com/rtc/11991/QNMusicMixerState-
Linux/11989) 或者
[QNAudioMusicMixer.SeekTo](https://developer.qiniu.com/rtc/11991/QNMusicMixerState-
Linux/11989) 后,会回调此状态
kStatePaused
* kStatePaused: QNMusicMixerState
* 混音操作暂停时的状态
当成功执行
[QNAudioMusicMixer.Pause](https://developer.qiniu.com/rtc/11991/QNMusicMixerState-
Linux/11989) 后,会回调此状态
kStateStopped
* kStateStopped: QNMusicMixerState
* 混音操作停止时的状态
当成功执行
[QNAudioMusicMixer.Stop](https://developer.qiniu.com/rtc/11991/QNMusicMixerState-
Linux/11989) 后,会回调此状态
kStateCompleted
* kStateCompleted: QNMusicMixerState
* 混音操作完成时的状态
> 当且仅当指定循环次数混音完成后,会回调此状态
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,686 |
API 概览 | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >API 概览
# API 概览
最近更新时间: 2022-03-29 00:26:19
QNRTC 是七牛云推出的一款跨平台平台的实时音视频 C++ SDK,提供了灵活的接口,支持高度定制以及二次开发。
> 本文档适用于 QNRTC 5.x+ 版本的 SDK,并不向下兼容。
QNRTC
QNRTC 提供 SDK 的入口方法,可以通过它进行 SDK 的初始化,各个类型 Track 的创建等操作。其核心方法如下:
创建 Track
方法 | 描述
---|---
[CreateMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11216) | 创建麦克风音频轨道
[CreateCameraVideoTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11216) | 创建摄像头视频轨道
[CreateCustomAudioTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11216) | 创建自定义导入音频数据轨道
[CreateCustomVideoTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11216) | 创建自定义导入视频数据轨道
[DestroyLocalTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11216) | 销毁创建的本地轨道
QNRTCClient
QNRTCClient 提供和房间相关的一些列方法,通过它我们可以实现加入房间,在房间内发布或者订阅相应的音视频轨道等操作。主要的核心方法如下:
核心方法
方法 | 描述
---|---
[Join](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11288) | 加入房间
[Leave](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11288) | 离开房间
[Publish](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11288) | 发布本地的音视频轨道
[UnPublish](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11288) | 取消发布本地的音视频轨道
[Subscribe](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11288) | 订阅远端用户发布的音视频轨道
[UnSubscribe](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11288) | 取消订阅远端用户发布的音视频轨道
转推 CDN
方法 | 描述
---|---
[StartLiveStreaming](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11288) | 开始单路转推或者合流转推
[StopLiveStreaming](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11288) | 停止单路转推或者合流转推
[SetTranscodingLiveStreamingTracks](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11288) | 更新合流转推的布局配置
[RemoveTranscodingLiveStreamingTracks](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11288) | 移除合流转推的布局配置
[SetLiveStreamingListener](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11288) | 设置转推相关事件的监听器
QNLocalTrack
QNLocalTrack 是本地创建的一个音视或者视频轨道,可以通过 QNRTC
来创建各种类型的音视频轨道,例如麦克风采集的音频轨道,摄像头采集的视频轨道,或者屏幕采集的视频轨道等等,我们真正用到的是它所衍生的子类。
以 QNLocalTrack 为基类,向下衍生的子类如下:
Hierarchy
* [QNLocalTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11208/QNLocalTrack-Linux)
* [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11209/QNLocalVideoTrack-Linux)
* [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11198/QNCameraVideoTrack-Linux)
* [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11205/QNCustomVideoTrack-Linux)
* [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11207/QNLocalAudioTrack-Linux)
* [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11210/QNMicrophoneAudioTrack-Linux)
* [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11203/QNCustomAudioTrack-Linux)
本地音频轨道
* 本地音频轨道 | 描述
---|---
[QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11210/QNMicrophoneAudioTrack-Linux) | 以麦克风采集到的音频数据为数据源创建的音频轨道,提供了音量控制,数据回调等接口,通过 CreateMicrophoneAudioTrack 创建。
[QNCustomAudioTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11203/QNCustomAudioTrack-Linux) | 以外部导入的 PCM 音频数据为数据源创建的音频轨道,可以通过 PushAudioFrame 方法往房间内推送数据,通过 CreateCustomAudioTrack 创建。
本地视频轨道 | 描述
---|---
[QNCameraVideoTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11198/QNCameraVideoTrack-Linux) | 以摄像头采集到的视频数据为数据源创建的视频轨道,提供了包括摄像头采集镜像,推送图片流等接口。通过 CreateCameraVideoTrack 创建。
[QNCustomVideoTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11205/QNCustomVideoTrack-Linux) | 以外部导入的 kI420 格式的视频数据为数据源创建的音频轨道,可以通过 PushVideoFrame 方法往房间内推送视频数据,通过 CreateCameraVideoTrack 创建。
QNRemoteTrack
QNRemoteTrack 是远端用户创建的音视频轨道,本地用户可以通过房间中的事件回调获取。其衍生的子类如下:
Hierarchy
* [QNRemoteTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11213/QNRemoteTrack-Linux)
* [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11215/QNRemoteVideoTrack-Linux)
* [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11212/QNRemoteAudioTrack-Linux)
* 远端音视频轨道 | 描述
---|---
[QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11212/QNRemoteAudioTrack-Linux) | 远端用户发布的音频轨道,当可以通过该类来调节播放的音量大小,并且还提供了回调音频数据等方法。
[QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11215/QNRemoteVideoTrack-Linux) | 远端用户发布的视频轨道,当可以通过该类来把远端视频画面渲染到视图中,并且还提供了回调视频数据等方法。
QNClientEventListener
房间内的事件可以通过该接口类进行监听,通过调用 SetQNClientEventListener,把 QNClientEventListener
作为参数传入。其提供的主要回调方法如下:
* 方法 | 描述
---|---
[OnConnectionStateChanged](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11261) | 房间状态改变时会触发此回调方法,自己加入房间成功,state 变为 CONNECTED,当离开房间时,state 变为 DISCONNECTED。详情可参看 [QNConnectionState](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11266/QNConnectionState-Linux)
[OnUserJoined](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11261) | 当远端用户加入房间时会触发此事件。
[OnUserPublished](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11261) | 当远端用户发布音视频轨道时会触发此事件。
[OnUserUnpublished](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11261) | 当远端用户取消发布音视频轨道时会触发此事件。
[OnUserLeft](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11261) | 当远端用户离开房间时会触发此事件。
[OnUserReconnecting](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11261) | 当远端用户正在重连时会触发此事件。
[OnUserReconnected](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11261) | 当远端用户重连成功时会触发此事件。
[OnSubscribed](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11261) | 当订阅远端用户的音视频轨道成功之后,会触发此事件。
[OnMessageReceived](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11261) | 当远端用户收到消息时会触发此事件。
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >API 概览
# API 概览
最近更新时间: 2022-03-29 00:26:19
QNRTC 是七牛云推出的一款跨平台平台的实时音视频 C++ SDK,提供了灵活的接口,支持高度定制以及二次开发。
> 本文档适用于 QNRTC 5.x+ 版本的 SDK,并不向下兼容。
QNRTC
QNRTC 提供 SDK 的入口方法,可以通过它进行 SDK 的初始化,各个类型 Track 的创建等操作。其核心方法如下:
创建 Track
方法 | 描述
---|---
[CreateMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11216) | 创建麦克风音频轨道
[CreateCameraVideoTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11216) | 创建摄像头视频轨道
[CreateCustomAudioTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11216) | 创建自定义导入音频数据轨道
[CreateCustomVideoTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11216) | 创建自定义导入视频数据轨道
[DestroyLocalTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11216) | 销毁创建的本地轨道
QNRTCClient
QNRTCClient 提供和房间相关的一些列方法,通过它我们可以实现加入房间,在房间内发布或者订阅相应的音视频轨道等操作。主要的核心方法如下:
核心方法
方法 | 描述
---|---
[Join](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11288) | 加入房间
[Leave](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11288) | 离开房间
[Publish](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11288) | 发布本地的音视频轨道
[UnPublish](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11288) | 取消发布本地的音视频轨道
[Subscribe](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11288) | 订阅远端用户发布的音视频轨道
[UnSubscribe](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11288) | 取消订阅远端用户发布的音视频轨道
转推 CDN
方法 | 描述
---|---
[StartLiveStreaming](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11288) | 开始单路转推或者合流转推
[StopLiveStreaming](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11288) | 停止单路转推或者合流转推
[SetTranscodingLiveStreamingTracks](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11288) | 更新合流转推的布局配置
[RemoveTranscodingLiveStreamingTracks](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11288) | 移除合流转推的布局配置
[SetLiveStreamingListener](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11288) | 设置转推相关事件的监听器
QNLocalTrack
QNLocalTrack 是本地创建的一个音视或者视频轨道,可以通过 QNRTC
来创建各种类型的音视频轨道,例如麦克风采集的音频轨道,摄像头采集的视频轨道,或者屏幕采集的视频轨道等等,我们真正用到的是它所衍生的子类。
以 QNLocalTrack 为基类,向下衍生的子类如下:
Hierarchy
* [QNLocalTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11208/QNLocalTrack-Linux)
* [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11209/QNLocalVideoTrack-Linux)
* [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11198/QNCameraVideoTrack-Linux)
* [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11205/QNCustomVideoTrack-Linux)
* [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11207/QNLocalAudioTrack-Linux)
* [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11210/QNMicrophoneAudioTrack-Linux)
* [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11203/QNCustomAudioTrack-Linux)
本地音频轨道
* 本地音频轨道 | 描述
---|---
[QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11210/QNMicrophoneAudioTrack-Linux) | 以麦克风采集到的音频数据为数据源创建的音频轨道,提供了音量控制,数据回调等接口,通过 CreateMicrophoneAudioTrack 创建。
[QNCustomAudioTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11203/QNCustomAudioTrack-Linux) | 以外部导入的 PCM 音频数据为数据源创建的音频轨道,可以通过 PushAudioFrame 方法往房间内推送数据,通过 CreateCustomAudioTrack 创建。
本地视频轨道 | 描述
---|---
[QNCameraVideoTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11198/QNCameraVideoTrack-Linux) | 以摄像头采集到的视频数据为数据源创建的视频轨道,提供了包括摄像头采集镜像,推送图片流等接口。通过 CreateCameraVideoTrack 创建。
[QNCustomVideoTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11205/QNCustomVideoTrack-Linux) | 以外部导入的 kI420 格式的视频数据为数据源创建的音频轨道,可以通过 PushVideoFrame 方法往房间内推送视频数据,通过 CreateCameraVideoTrack 创建。
QNRemoteTrack
QNRemoteTrack 是远端用户创建的音视频轨道,本地用户可以通过房间中的事件回调获取。其衍生的子类如下:
Hierarchy
* [QNRemoteTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11213/QNRemoteTrack-Linux)
* [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11215/QNRemoteVideoTrack-Linux)
* [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11212/QNRemoteAudioTrack-Linux)
* 远端音视频轨道 | 描述
---|---
[QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11212/QNRemoteAudioTrack-Linux) | 远端用户发布的音频轨道,当可以通过该类来调节播放的音量大小,并且还提供了回调音频数据等方法。
[QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11215/QNRemoteVideoTrack-Linux) | 远端用户发布的视频轨道,当可以通过该类来把远端视频画面渲染到视图中,并且还提供了回调视频数据等方法。
QNClientEventListener
房间内的事件可以通过该接口类进行监听,通过调用 SetQNClientEventListener,把 QNClientEventListener
作为参数传入。其提供的主要回调方法如下:
* 方法 | 描述
---|---
[OnConnectionStateChanged](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11261) | 房间状态改变时会触发此回调方法,自己加入房间成功,state 变为 CONNECTED,当离开房间时,state 变为 DISCONNECTED。详情可参看 [QNConnectionState](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11266/QNConnectionState-Linux)
[OnUserJoined](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11261) | 当远端用户加入房间时会触发此事件。
[OnUserPublished](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11261) | 当远端用户发布音视频轨道时会触发此事件。
[OnUserUnpublished](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11261) | 当远端用户取消发布音视频轨道时会触发此事件。
[OnUserLeft](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11261) | 当远端用户离开房间时会触发此事件。
[OnUserReconnecting](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11261) | 当远端用户正在重连时会触发此事件。
[OnUserReconnected](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11261) | 当远端用户重连成功时会触发此事件。
[OnSubscribed](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11261) | 当订阅远端用户的音视频轨道成功之后,会触发此事件。
[OnMessageReceived](https://developer.qiniu.com/rtc/11254/APIOverview-Linux/11261) | 当远端用户收到消息时会触发此事件。
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,688 |
QNRTC | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNRTC
# QNRTC
最近更新时间: 2022-03-28 17:42:36
QNRTC 作为 SDK 的入口,提供创建本地音视频轨道,创建
[QNRTCClient](https://developer.qiniu.com/rtc/11216/QNRTC-
Linux/11288/QNRTCClient-Linux) 对象等一系列静态方法
Index
Core Methods
* GetVersion
* SetLogFile
* Init
* DeInint
* GetCameraCount
* GetCameraInfo
* GetAudioRecordingDeviceCount
* GetAudioRecordingDeviceInfo
* GetAudioPlaybackDeviceCount
* GetAudioPlaybackDeviceInfo
* SetAudioRecordingDevice
* SetAudioPlaybackDevice
* CreateClient[1/2]
* CreateClient[2/2]
* DestroyRtcClient
* SetClientEventListener
* CreateMicrophoneAudioTrack
* CreateCustomAudioTrack
* CreateCameraVideoTrack
* CreateCustomVideoTrack
* DestroyLocalTrack
* SetAudioRouteToSpeakerphone
* SetAudioPlayMute
* IsAudioPlayMute
Core Methods
GetVersion
* static void GetVersion(std::string& ver)
* 获取 sdk 版本号
Parameters
* ver: string
版本号
SetLogFile
* static void SetLogFile([QNLogLevel](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11275/QNLogLevel-Linux) level, const std::string& dir_name, const std::string& file_name)
* 设置是否开启本地日志保存功能,并设置保存文件的路径和前缀名,不调用此接口,默认不开启日志记录
Parameters
* level: [QNLogLevel](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11275/QNLogLevel-Linux)
日志开启级别
* dir_name: string
日志文件目录名,不存在则自动创建
* file_name: string
日志文件前缀名
Init
* static void Init(QNRTCSetting& setting, QNRTCEventListener* listener)
* 初始化
Parameters
* setting: [QNRTCSetting](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11218/QNRTCSetting-Linux)
日志开启级别
* listener: [QNRTCEventListener](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11217/QNRTCEventListener-Linux)
日志文件目录名,不存在则自动创建
DeInint
* static void DeInint()
* 反初始化
GetCameraCount
* static int32_t GetCameraCount()
* 获取摄像头数量, 此方法仅适用于 Windows 和 Linux 平台
Returns 设备数量
GetCameraInfo
* static const [QNCameraInfo](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11260/QNCameraInfo-Linux)& GetCameraInfo(int32_t index)
* 获取指定序号的摄像头设备信息,首先通过 GetCameraCount 获取摄像头数量,此方法仅适用于 Windows 和 Linux 平台
Parameters
* index: int32_t
设备序号,<= GetCameraCount()
Returns 指定index 的摄像头设备信息
GetAudioRecordingDeviceCount
* static int32_t GetAudioRecordingDeviceCount()
* 获取音频采集设备数量,此方法仅适用于 Windows 和 Linux 平台
Returns 音频采集设备的数量
GetAudioRecordingDeviceInfo
* static [QNAudioDeviceInfo](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/undefined)& GetAudioRecordingDeviceInfo(int32_t index)
* 获取指定 index 音频采集设备信息,此方法仅适用于 Windows 和 Linux 平台
Parameters
* index: int32_t
采集设备序号,<= GetAudioRecordingDeviceCount()
Returns 指定 index 的音频采集设备信息
GetAudioPlaybackDeviceCount
* static int32_t GetAudioPlaybackDeviceCount()
* 获取音频播放设备数量,此方法仅适用于 Windows 和 Linux 平台
Returns 音频播放设备的数量
GetAudioPlaybackDeviceInfo
* static [QNAudioDeviceInfo](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/undefined)& GetAudioPlaybackDeviceInfo(int32_t index)
* 获取指定 index 音频播放设备信息,此方法仅适用于 Windows 和 Linux 平台
Parameters
* index: int32_t
采集设备序号,<= GetAudioRecordingDeviceCount()
Returns 指定 index 的音频播放设备信息
SetAudioRecordingDevice
* static int32_t SetAudioRecordingDevice(int32_t index)
* 设置连麦使用的音频采集设备,不调用则使用系统默认采集设备,连麦过程中设置无效,需在发布音频 Track 前调用,此方法仅适用于 Windows 和 Linux 平台
Parameters
* index: int32_t
采集设备序号,<= GetAudioRecordingDeviceCount()
Returns 成功返回 0,其它请参考错误码列表
SetAudioPlaybackDevice
* static int32_t SetAudioPlaybackDevice(int32_t index)
* 设置连麦使用的音频播放设备,不调用则使用系统默认采集设备,连麦过程中设置无效,需在发布音频 Track 前调用,此方法仅适用于 Windows 和 Linux 平台
Parameters
* index: int32_t
采集设备序号,<= GetAudioPlaybackDeviceCount()
Returns 成功返回 0,其它请参考错误码列表
CreateClient[1/2]
* static [QNRTCClient](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11288/QNRTCClient-Linux)* CreateClient([QNClientEventListener](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11261/QNClientEventListener-Linux)* listener)
* 创建一个连接对象,QNRTCClient 全局只可存在一个
Parameters
* listener: [QNClientEventListener](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11261/QNClientEventListener-Linux)
连接中的事件监听
Returns 连接管理对象指针
CreateClient[2/2]
* static [QNRTCClient](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11288/QNRTCClient-Linux)* CreateClient([QNRTCClientConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/undefined)& config, [QNClientEventListener](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11261/QNClientEventListener-Linux)* listener)
* 使用 [QNRTCClientConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/undefined) 设创建一个连接对象并为其设置事件监听,QNRTCClient 全局只可存在一个
Parameters
* config: [QNRTCClientConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/undefined)
连接管理对象初始化配置
* listener: [QNClientEventListener](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11261/QNClientEventListener-Linux)
连接中的事件监听
Returns 连接管理对象指针
DestroyRtcClient
* static void DestroyRtcClient([QNRTCClient](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11288/QNRTCClient-Linux)* ptr)
* 释放由 CreateClient 创建的连接管理对象
Parameters
* ptr: [QNRTCClient](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11288/QNRTCClient-Linux)
[QNRTCClient](https://developer.qiniu.com/rtc/11216/QNRTC-
Linux/11288/QNRTCClient-Linux) 对象指针
SetClientEventListener
* static void SetClientEventListener([QNClientEventListener](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11261/QNClientEventListener-Linux)* listener)
* 设置连接中的事件监听
Parameters
* listener: [QNClientEventListener](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11261/QNClientEventListener-Linux)
[QNClientEventListener](https://developer.qiniu.com/rtc/11216/QNRTC-
Linux/11261/QNClientEventListener-Linux) 对象指针
CreateMicrophoneAudioTrack
* static [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11210/QNMicrophoneAudioTrack-Linux)* CreateMicrophoneAudioTrack([QNMicrophoneAudioTrackConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11211/QNMicrophoneAudioTrackConfig-Linux)& config)
* 通过指定一个 [QNMicrophoneAudioTrackConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11211/QNMicrophoneAudioTrackConfig-Linux) 来创建一个麦克风音频轨道对象
> 本地音频 Track 只可存在一个,重复创建会返回 null
Parameters
* config: [QNMicrophoneAudioTrackConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11211/QNMicrophoneAudioTrackConfig-Linux)
采集音频的配置
Returns [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11216/QNRTC-
Linux/11210/QNMicrophoneAudioTrack-Linux) 对象指针
CreateCustomAudioTrack
* static [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11203/QNCustomAudioTrack-Linux)* CreateCustomAudioTrack([QNCustomAudioTrackConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11204/QNCustomAudioTrackConfig-Linux)& config)
* 通过指定一个 [QNCustomAudioTrackConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11204/QNCustomAudioTrackConfig-Linux) 来创建一个自定义音频轨道对象
> 本地音频 Track 只可存在一个,重复创建会返回 null
Parameters
* config: [QNCustomAudioTrackConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11204/QNCustomAudioTrackConfig-Linux)
自定义采集音频的配置
Returns [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11216/QNRTC-
Linux/11203/QNCustomAudioTrack-Linux) 对象指针
CreateCameraVideoTrack
* static [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11198/QNCameraVideoTrack-Linux)* CreateCameraVideoTrack([QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11201/QNCameraVideoTrackConfig-Linux)& config)
* 通过指定一个 [QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11201/QNCameraVideoTrackConfig-Linux) 来创建一个摄像头视频轨道对象
Parameters
* config: [QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11201/QNCameraVideoTrackConfig-Linux)
摄像头 Track 的配置,可设置视频的采集配置与开关大小流功能等
Returns [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11216/QNRTC-
Linux/11198/QNCameraVideoTrack-Linux) 对象指针
CreateCustomVideoTrack
* static [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11205/QNCustomVideoTrack-Linux)* CreateCustomVideoTrack([QNCustomVideoTrackConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11206/QNCustomVideoTrackConfig-Linux)& config)
* 通过指定一个 [QNCustomVideoTrackConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11206/QNCustomVideoTrackConfig-Linux) 来创建一个自定义视频采集轨道对象
> 自定义视频采集轨道可以创建多个,而其他采集轨道只能创建一个
Parameters
* config: [QNCustomVideoTrackConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11206/QNCustomVideoTrackConfig-Linux)
自定义视频采集 Track 的配置,可设置视频的编码配置
Returns [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11216/QNRTC-
Linux/11205/QNCustomVideoTrack-Linux) 对象指针
DestroyLocalTrack
* static void DestroyLocalTrack([QNLocalTrack](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11208/QNLocalTrack-Linux)* ptr)
* 释放前面创建的音视频轨道实例
Parameters
* ptr: [QNLocalTrack](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11208/QNLocalTrack-Linux)
音视频轨道实例
SetAudioRouteToSpeakerphone
* static void SetAudioRouteToSpeakerphone(bool audio_route_to_speakerphone)
* 设置是否将音频路由切换到扬声器,设置为 false 后将会切换到之前的音频路由。
设置生效后会触发
[QNRTCEventListener.OnAudioRouteChanged](https://developer.qiniu.com/rtc/11216/QNRTC-
Linux/11217) 回调对应的路由状态,该方法仅仅适用于 Android 和 iOS 平台
Parameters
* audio_route_to_speakerphone: bool
是否将音频路由切换到扬声器
SetAudioPlayMute
* static void SetAudioPlayMute(bool muted)
* 设置音频播放静音,该方法仅仅适用于 Android 和 iOS 平台
Parameters
* muted: bool
是否将音频播放设置为静音
IsAudioPlayMute
* static bool IsAudioPlayMute()
* 当前音频播放是否为静音,该方法仅仅适用于 Android 和 iOS 平台
Returns 音频静音状态,true 为静音,false 不为静音
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNRTC
# QNRTC
最近更新时间: 2022-03-28 17:42:36
QNRTC 作为 SDK 的入口,提供创建本地音视频轨道,创建
[QNRTCClient](https://developer.qiniu.com/rtc/11216/QNRTC-
Linux/11288/QNRTCClient-Linux) 对象等一系列静态方法
Index
Core Methods
* GetVersion
* SetLogFile
* Init
* DeInint
* GetCameraCount
* GetCameraInfo
* GetAudioRecordingDeviceCount
* GetAudioRecordingDeviceInfo
* GetAudioPlaybackDeviceCount
* GetAudioPlaybackDeviceInfo
* SetAudioRecordingDevice
* SetAudioPlaybackDevice
* CreateClient[1/2]
* CreateClient[2/2]
* DestroyRtcClient
* SetClientEventListener
* CreateMicrophoneAudioTrack
* CreateCustomAudioTrack
* CreateCameraVideoTrack
* CreateCustomVideoTrack
* DestroyLocalTrack
* SetAudioRouteToSpeakerphone
* SetAudioPlayMute
* IsAudioPlayMute
Core Methods
GetVersion
* static void GetVersion(std::string& ver)
* 获取 sdk 版本号
Parameters
* ver: string
版本号
SetLogFile
* static void SetLogFile([QNLogLevel](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11275/QNLogLevel-Linux) level, const std::string& dir_name, const std::string& file_name)
* 设置是否开启本地日志保存功能,并设置保存文件的路径和前缀名,不调用此接口,默认不开启日志记录
Parameters
* level: [QNLogLevel](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11275/QNLogLevel-Linux)
日志开启级别
* dir_name: string
日志文件目录名,不存在则自动创建
* file_name: string
日志文件前缀名
Init
* static void Init(QNRTCSetting& setting, QNRTCEventListener* listener)
* 初始化
Parameters
* setting: [QNRTCSetting](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11218/QNRTCSetting-Linux)
日志开启级别
* listener: [QNRTCEventListener](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11217/QNRTCEventListener-Linux)
日志文件目录名,不存在则自动创建
DeInint
* static void DeInint()
* 反初始化
GetCameraCount
* static int32_t GetCameraCount()
* 获取摄像头数量, 此方法仅适用于 Windows 和 Linux 平台
Returns 设备数量
GetCameraInfo
* static const [QNCameraInfo](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11260/QNCameraInfo-Linux)& GetCameraInfo(int32_t index)
* 获取指定序号的摄像头设备信息,首先通过 GetCameraCount 获取摄像头数量,此方法仅适用于 Windows 和 Linux 平台
Parameters
* index: int32_t
设备序号,<= GetCameraCount()
Returns 指定index 的摄像头设备信息
GetAudioRecordingDeviceCount
* static int32_t GetAudioRecordingDeviceCount()
* 获取音频采集设备数量,此方法仅适用于 Windows 和 Linux 平台
Returns 音频采集设备的数量
GetAudioRecordingDeviceInfo
* static [QNAudioDeviceInfo](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/undefined)& GetAudioRecordingDeviceInfo(int32_t index)
* 获取指定 index 音频采集设备信息,此方法仅适用于 Windows 和 Linux 平台
Parameters
* index: int32_t
采集设备序号,<= GetAudioRecordingDeviceCount()
Returns 指定 index 的音频采集设备信息
GetAudioPlaybackDeviceCount
* static int32_t GetAudioPlaybackDeviceCount()
* 获取音频播放设备数量,此方法仅适用于 Windows 和 Linux 平台
Returns 音频播放设备的数量
GetAudioPlaybackDeviceInfo
* static [QNAudioDeviceInfo](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/undefined)& GetAudioPlaybackDeviceInfo(int32_t index)
* 获取指定 index 音频播放设备信息,此方法仅适用于 Windows 和 Linux 平台
Parameters
* index: int32_t
采集设备序号,<= GetAudioRecordingDeviceCount()
Returns 指定 index 的音频播放设备信息
SetAudioRecordingDevice
* static int32_t SetAudioRecordingDevice(int32_t index)
* 设置连麦使用的音频采集设备,不调用则使用系统默认采集设备,连麦过程中设置无效,需在发布音频 Track 前调用,此方法仅适用于 Windows 和 Linux 平台
Parameters
* index: int32_t
采集设备序号,<= GetAudioRecordingDeviceCount()
Returns 成功返回 0,其它请参考错误码列表
SetAudioPlaybackDevice
* static int32_t SetAudioPlaybackDevice(int32_t index)
* 设置连麦使用的音频播放设备,不调用则使用系统默认采集设备,连麦过程中设置无效,需在发布音频 Track 前调用,此方法仅适用于 Windows 和 Linux 平台
Parameters
* index: int32_t
采集设备序号,<= GetAudioPlaybackDeviceCount()
Returns 成功返回 0,其它请参考错误码列表
CreateClient[1/2]
* static [QNRTCClient](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11288/QNRTCClient-Linux)* CreateClient([QNClientEventListener](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11261/QNClientEventListener-Linux)* listener)
* 创建一个连接对象,QNRTCClient 全局只可存在一个
Parameters
* listener: [QNClientEventListener](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11261/QNClientEventListener-Linux)
连接中的事件监听
Returns 连接管理对象指针
CreateClient[2/2]
* static [QNRTCClient](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11288/QNRTCClient-Linux)* CreateClient([QNRTCClientConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/undefined)& config, [QNClientEventListener](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11261/QNClientEventListener-Linux)* listener)
* 使用 [QNRTCClientConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/undefined) 设创建一个连接对象并为其设置事件监听,QNRTCClient 全局只可存在一个
Parameters
* config: [QNRTCClientConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/undefined)
连接管理对象初始化配置
* listener: [QNClientEventListener](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11261/QNClientEventListener-Linux)
连接中的事件监听
Returns 连接管理对象指针
DestroyRtcClient
* static void DestroyRtcClient([QNRTCClient](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11288/QNRTCClient-Linux)* ptr)
* 释放由 CreateClient 创建的连接管理对象
Parameters
* ptr: [QNRTCClient](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11288/QNRTCClient-Linux)
[QNRTCClient](https://developer.qiniu.com/rtc/11216/QNRTC-
Linux/11288/QNRTCClient-Linux) 对象指针
SetClientEventListener
* static void SetClientEventListener([QNClientEventListener](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11261/QNClientEventListener-Linux)* listener)
* 设置连接中的事件监听
Parameters
* listener: [QNClientEventListener](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11261/QNClientEventListener-Linux)
[QNClientEventListener](https://developer.qiniu.com/rtc/11216/QNRTC-
Linux/11261/QNClientEventListener-Linux) 对象指针
CreateMicrophoneAudioTrack
* static [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11210/QNMicrophoneAudioTrack-Linux)* CreateMicrophoneAudioTrack([QNMicrophoneAudioTrackConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11211/QNMicrophoneAudioTrackConfig-Linux)& config)
* 通过指定一个 [QNMicrophoneAudioTrackConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11211/QNMicrophoneAudioTrackConfig-Linux) 来创建一个麦克风音频轨道对象
> 本地音频 Track 只可存在一个,重复创建会返回 null
Parameters
* config: [QNMicrophoneAudioTrackConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11211/QNMicrophoneAudioTrackConfig-Linux)
采集音频的配置
Returns [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11216/QNRTC-
Linux/11210/QNMicrophoneAudioTrack-Linux) 对象指针
CreateCustomAudioTrack
* static [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11203/QNCustomAudioTrack-Linux)* CreateCustomAudioTrack([QNCustomAudioTrackConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11204/QNCustomAudioTrackConfig-Linux)& config)
* 通过指定一个 [QNCustomAudioTrackConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11204/QNCustomAudioTrackConfig-Linux) 来创建一个自定义音频轨道对象
> 本地音频 Track 只可存在一个,重复创建会返回 null
Parameters
* config: [QNCustomAudioTrackConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11204/QNCustomAudioTrackConfig-Linux)
自定义采集音频的配置
Returns [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11216/QNRTC-
Linux/11203/QNCustomAudioTrack-Linux) 对象指针
CreateCameraVideoTrack
* static [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11198/QNCameraVideoTrack-Linux)* CreateCameraVideoTrack([QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11201/QNCameraVideoTrackConfig-Linux)& config)
* 通过指定一个 [QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11201/QNCameraVideoTrackConfig-Linux) 来创建一个摄像头视频轨道对象
Parameters
* config: [QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11201/QNCameraVideoTrackConfig-Linux)
摄像头 Track 的配置,可设置视频的采集配置与开关大小流功能等
Returns [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11216/QNRTC-
Linux/11198/QNCameraVideoTrack-Linux) 对象指针
CreateCustomVideoTrack
* static [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11205/QNCustomVideoTrack-Linux)* CreateCustomVideoTrack([QNCustomVideoTrackConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11206/QNCustomVideoTrackConfig-Linux)& config)
* 通过指定一个 [QNCustomVideoTrackConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11206/QNCustomVideoTrackConfig-Linux) 来创建一个自定义视频采集轨道对象
> 自定义视频采集轨道可以创建多个,而其他采集轨道只能创建一个
Parameters
* config: [QNCustomVideoTrackConfig](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11206/QNCustomVideoTrackConfig-Linux)
自定义视频采集 Track 的配置,可设置视频的编码配置
Returns [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11216/QNRTC-
Linux/11205/QNCustomVideoTrack-Linux) 对象指针
DestroyLocalTrack
* static void DestroyLocalTrack([QNLocalTrack](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11208/QNLocalTrack-Linux)* ptr)
* 释放前面创建的音视频轨道实例
Parameters
* ptr: [QNLocalTrack](https://developer.qiniu.com/rtc/11216/QNRTC-Linux/11208/QNLocalTrack-Linux)
音视频轨道实例
SetAudioRouteToSpeakerphone
* static void SetAudioRouteToSpeakerphone(bool audio_route_to_speakerphone)
* 设置是否将音频路由切换到扬声器,设置为 false 后将会切换到之前的音频路由。
设置生效后会触发
[QNRTCEventListener.OnAudioRouteChanged](https://developer.qiniu.com/rtc/11216/QNRTC-
Linux/11217) 回调对应的路由状态,该方法仅仅适用于 Android 和 iOS 平台
Parameters
* audio_route_to_speakerphone: bool
是否将音频路由切换到扬声器
SetAudioPlayMute
* static void SetAudioPlayMute(bool muted)
* 设置音频播放静音,该方法仅仅适用于 Android 和 iOS 平台
Parameters
* muted: bool
是否将音频播放设置为静音
IsAudioPlayMute
* static bool IsAudioPlayMute()
* 当前音频播放是否为静音,该方法仅仅适用于 Android 和 iOS 平台
Returns 音频静音状态,true 为静音,false 不为静音
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,694 |
QNRTCSetting | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNRTCSetting
# QNRTCSetting
最近更新时间: 2022-03-28 17:43:31
SDK 的核心参数配置结构体
Index
Properties
* is_aec3_enabled
* is_maintain_resolution_enabled
* is_audio_redundant_enabled
* is_video_error_correction_enabled
* is_encoder_quality_mode_enabled
* is_audio_route_to_speakerphone
* log_level
* encoder_type
Properties
is_aec3_enabled
* is_aec3_enabled: bool
* 是否开启软件回音消除,默认开启
is_maintain_resolution_enabled
* is_maintain_resolution_enabled: bool
* 是否固定编码分辨率,默认不固定
is_audio_redundant_enabled
* is_audio_redundant_enabled: bool
* 是否开启音频冗余包发送,开启后能抗抗一定的丢包,默认开启
is_video_error_correction_enabled
* is_video_error_correction_enabled: bool
* 是否开启视频冗余包发送,开启后能抗一定的丢包,默认开启
is_encoder_quality_mode_enabled
* is_encoder_quality_mode_enabled: bool
* 是否开启软编质量优先模式,默认关闭,该参数仅适用于 Android
质量优先模式会优先保证视频的编码质量,实际码率可能会和目标码率存在差异。关闭该模式后会尽量控制编码码率为目标码率
is_audio_route_to_speakerphone
* is_audio_route_to_speakerphone: bool
* 设置是否配置扬声器为默认音频路由,默认开启,若传入 false,则默认音频路由为听筒,该参数仅适用于 Android 和 iOS
log_level
* log_level: [QNLogLevel](https://developer.qiniu.com/rtc/11218/QNRTCSetting-Linux/11275/QNLogLevel-Linux)
* 设置日志级别,默认为 kLogInfo 级别
encoder_type
* encoder_type: [QNVideoEncoderType](https://developer.qiniu.com/rtc/11218/QNRTCSetting-Linux/11299/QNVideoEncoderType-Linux)
* 设置编码类型,Linux 当前仅支持 kEncodeOpenH264 软件编码
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNRTCSetting
# QNRTCSetting
最近更新时间: 2022-03-28 17:43:31
SDK 的核心参数配置结构体
Index
Properties
* is_aec3_enabled
* is_maintain_resolution_enabled
* is_audio_redundant_enabled
* is_video_error_correction_enabled
* is_encoder_quality_mode_enabled
* is_audio_route_to_speakerphone
* log_level
* encoder_type
Properties
is_aec3_enabled
* is_aec3_enabled: bool
* 是否开启软件回音消除,默认开启
is_maintain_resolution_enabled
* is_maintain_resolution_enabled: bool
* 是否固定编码分辨率,默认不固定
is_audio_redundant_enabled
* is_audio_redundant_enabled: bool
* 是否开启音频冗余包发送,开启后能抗抗一定的丢包,默认开启
is_video_error_correction_enabled
* is_video_error_correction_enabled: bool
* 是否开启视频冗余包发送,开启后能抗一定的丢包,默认开启
is_encoder_quality_mode_enabled
* is_encoder_quality_mode_enabled: bool
* 是否开启软编质量优先模式,默认关闭,该参数仅适用于 Android
质量优先模式会优先保证视频的编码质量,实际码率可能会和目标码率存在差异。关闭该模式后会尽量控制编码码率为目标码率
is_audio_route_to_speakerphone
* is_audio_route_to_speakerphone: bool
* 设置是否配置扬声器为默认音频路由,默认开启,若传入 false,则默认音频路由为听筒,该参数仅适用于 Android 和 iOS
log_level
* log_level: [QNLogLevel](https://developer.qiniu.com/rtc/11218/QNRTCSetting-Linux/11275/QNLogLevel-Linux)
* 设置日志级别,默认为 kLogInfo 级别
encoder_type
* encoder_type: [QNVideoEncoderType](https://developer.qiniu.com/rtc/11218/QNRTCSetting-Linux/11299/QNVideoEncoderType-Linux)
* 设置编码类型,Linux 当前仅支持 kEncodeOpenH264 软件编码
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,706 |
QNRTCClient | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNRTCClient
# QNRTCClient
最近更新时间: 2022-03-28 17:57:26
RTC 核心类,包含加入房间,离开房间,订阅、发布 Track,获取统计信息等功能
Index
Core Methods
* SetClientRole
* SetAutoSubscribe
* Join
* Leave
* GetConnectionState
* Publish
* UnPublish
* Subscribe
* UnSubscribe
* SendCustomMessage
* SetLiveStreamingListener
* StartLiveStreaming[1/2]
* StartLiveStreaming[2/2]
* StopLiveStreaming[1/2]
* StopLiveStreaming[2/2]
* SetTranscodingLiveStreamingTracks
* RemoveTranscodingLiveStreamingTracks
* SetRemoteAudioMixedFrameListener
* GetPublishedTracks
* GetRemoteUsers[1/2]
* GetRemoteUsers[2/2]
* GetRemoteVideoTrackStats
* GetRemoteAudioTrackStats
* GetLocalVideoTrackStats
* GetLocalAudioTrackStats
Core Methods
SetClientRole
* virtual void SetClientRole([QNClientRole](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11263/QNClientRole-Linux) client_role, [QNClientRoleListener](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11264/QNClientRoleListener-Linux)* listener) = 0
* 设置直播场景下的用户角色
该方法在加入频道前后均可调用。
Parameters
* client_role: [QNClientRole](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11263/QNClientRole-Linux)
目标角色
* listener: [QNClientRoleListener](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11264/QNClientRoleListener-Linux)
设置角色结果回调
SetAutoSubscribe
* virtual void SetAutoSubscribe(bool auto_subscribe) = 0
* 设置是否启用自动订阅
当开启此选项后,房间内有任意用户新发布 Track 的时候,会自动订阅此路 Track,订阅成功后,会触发
[QNClientEventListener.OnSubscribed](https://developer.qiniu.com/rtc/11288/QNRTCClient-
Linux/11261) 回调
Parameters
* auto_subscribe: bool
是否自动订阅
Join
* virtual void Join(const std::string& token, const std::string& user_data = "") = 0
* 加入房间
接口调用成功后,将会触发
[QNClientEventListener.OnConnectionStateChanged](https://developer.qiniu.com/rtc/11288/QNRTCClient-
Linux/11261) 回调
> 请确保在
> [QNConnectionState.kDisconnected](https://developer.qiniu.com/rtc/11288/QNRTCClient-
> Linux/11266) 状态下调用该接口加入房间,否则接口调用无效
Parameters
* token: string
房间 Token
* user_data: string
用户信息
Leave
* virtual void Leave() = 0
* 离开房间
成功离开房间后,会触发
[QNClientEventListener.OnConnectionStateChanged](https://developer.qiniu.com/rtc/11288/QNRTCClient-
Linux/11261) 回调
GetConnectionState
* virtual QNConnectionState GetConnectionState() = 0
* 获取当前房间连接状态
Returns [QNConnectionState](https://developer.qiniu.com/rtc/11288/QNRTCClient-
Linux/undefined)
Publish
* virtual void Publish(LocalTrackList& track_list, QNPublishResultCallback* listener) = 0
* 发布本地媒体流,结果通过 [QNPublishResultCallback](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11283/QNPublishResultCallback-Linux) 接口通知
Parameters
* track_list: std::list<[QNLocalTrack](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11208/QNLocalTrack-Linux)*>
要发布的本地 Track 列表
* listener: [QNPublishResultCallback](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11283/QNPublishResultCallback-Linux)
发布结果回调函数
UnPublish
* virtual void UnPublish(LocalTrackList& track_list) = 0
* 取消发布本地媒体列表
Parameters
* track_list: std::list<[QNLocalTrack](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11208/QNLocalTrack-Linux)*>
要取消发布的本地 Track 列表
Subscribe
* virtual void Subscribe(const RemoteTrackList& track_list) = 0
* 订阅远端 Track 列表,订阅成功后,会触发 [QNClientEventListener.OnSubscribed](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11261) 回调
Parameters
* track_list: std::list<shared_ptr<[QNRemoteTrack](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11213/QNRemoteTrack-Linux)>>
要订阅的远端 Track 列表
UnSubscribe
* virtual void UnSubscribe(const RemoteTrackList& track_list) = 0
* 取消订阅远端 Track 列表
Parameters
* track_list: std::list<shared_ptr<[QNRemoteTrack](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11213/QNRemoteTrack-Linux)>>
要取消订阅的远端 Track 列表
SendCustomMessage
* virtual void SendCustomMessage(const std::list<std::string>& users_list, const std::string& message_id, const std::string& message) = 0
* 发送自定义消息到指定用户群,发送成功后,会触发远端用户的 [QNClientEventListener.OnMessageReceived](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11261) 回调接口
Parameters
* users_list: std::list<std::string>
用户 ID 列表
* message_id: string
自定义消息 ID
* message: string
自定义消息内容
SetLiveStreamingListener
* virtual void SetLiveStreamingListener([QNLiveStreamingListener](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11272/QNLiveStreamingListener-Linux)* listener) = 0
* 设置 CDN 转推监听接口
Parameters
* listener: [QNLiveStreamingListener](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11272/QNLiveStreamingListener-Linux)
转推监听接口
StartLiveStreaming[1/2]
* virtual void StartLiveStreaming([QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11268/QNDirectLiveStreamingConfig-Linux)& config) = 0
* 开始单路 CDN 转推
Parameters
* config: [QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11268/QNDirectLiveStreamingConfig-Linux)
单路转推配置
StartLiveStreaming[2/2]
* virtual void StartLiveStreaming([QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11294/QNTranscodingLiveStreamingConfig-Linux)& config) = 0;
* 开始合流转码 CDN 转推
Parameters
* config: [QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11294/QNTranscodingLiveStreamingConfig-Linux)
合流转推配置
StopLiveStreaming[1/2]
* virtual void StopLiveStreaming([QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11268/QNDirectLiveStreamingConfig-Linux)& config) = 0
* 停止单路 CDN 转推
Parameters
* config: [QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11268/QNDirectLiveStreamingConfig-Linux)
单路 CDN 转推配置
StopLiveStreaming[2/2]
* virtual void StopLiveStreaming([QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11294/QNTranscodingLiveStreamingConfig-Linux)& config) = 0
* 停止合流转码 CDN 转推
Parameters
* config: [QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11294/QNTranscodingLiveStreamingConfig-Linux)
合流转推配置
SetTranscodingLiveStreamingTracks
* virtual void SetTranscodingLiveStreamingTracks(std::string& stream_id, QNTranscodeingTrackList& transcoding_track_list) = 0
* 新增、更新合流转推布局配置
> 新增 track 布局以及对已有的 track 的合流布局进行更新均可通过该接口实现,只需修改 transcodingTracks 对应的 track
> 内容即可。
Parameters
* stream_id: string
合流任务 stream id
* transcoding_track_list: std::list<[QNTranscodingLiveStreamingTrack](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11296/QNTranscodingLiveStreamingTrack-Linux)>
待新增、更新的合流转推布局配置
RemoveTranscodingLiveStreamingTracks
* virtual void RemoveTranscodingLiveStreamingTracks(std::string& stream_id, QNTranscodeingTrackList& transcoding_track_list) = 0
* 移除合流转推布局配置
Parameters
* stream_id: string
合流任务 stream id
* transcoding_track_list: std::list<[QNTranscodingLiveStreamingTrack](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11296/QNTranscodingLiveStreamingTrack-Linux)>
待移除合流转推布局配置
SetRemoteAudioMixedFrameListener
* virtual void SetRemoteAudioMixedFrameListener([QNRemoteAudioMixedFrameListener](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11284/QNRemoteAudioMixedFrameListener-Linux)* listener) = 0
* 设置监听远端所有音频 Track 混合后的音频数据
Parameters
* listener: [QNRemoteAudioMixedFrameListener](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11284/QNRemoteAudioMixedFrameListener-Linux)
音频数据监听接口
GetPublishedTracks
* virtual LocalTrackList& GetPublishedTracks() = 0
* 获取所有已经发布的本地 Track
Returns
std::list<[QNLocalTrack](https://developer.qiniu.com/rtc/11288/QNRTCClient-
Linux/11208/QNLocalTrack-Linux)*>
GetRemoteUsers[1/2]
* virtual [QNRemoteUser](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11214/QNRemoteUser-Linux)& GetRemoteUsers(const std::string& user_id) = 0
* 获取对应 ID 的远端用户
Parameters
* user_id: string
远端用户 ID
Returns [QNRemoteUser](https://developer.qiniu.com/rtc/11288/QNRTCClient-
Linux/11214/QNRemoteUser-Linux)
GetRemoteUsers[2/2]
* virtual RemoteUserList& GetRemoteUsers() = 0
* 获取房间内所有的远端用户
Returns
std::list<[QNRemoteUser](https://developer.qiniu.com/rtc/11288/QNRTCClient-
Linux/11214/QNRemoteUser-Linux)>
GetRemoteVideoTrackStats
* virtual QNRemoteVideoTrackStatsMap& GetRemoteVideoTrackStats() = 0
* 获取已订阅的远端视频轨道统计信息
Returns std::map<std::string,
[QNRemoteVideoTrackStats](https://developer.qiniu.com/rtc/11288/QNRTCClient-
Linux/11286/QNRemoteVideoTrackStats-Linux)>
GetRemoteAudioTrackStats
* virtual QNRemoteAudioTrackStatsMap& GetRemoteAudioTrackStats() = 0
* 获取已订阅的远端音频轨道统计信息
Returns std::map<std::string,
[QNRemoteAudioTrackStats](https://developer.qiniu.com/rtc/11288/QNRTCClient-
Linux/11285/QNRemoteAudioTrackStats-Linux)>
GetLocalVideoTrackStats
* virtual QNLocalVideoTracksStatsMap& GetLocalVideoTrackStats() = 0
* 获取已发布的近端视频轨道统计信息
Returns std::map<std::string,
std::list<[QNLocalVideoTrackStats](https://developer.qiniu.com/rtc/11288/QNRTCClient-
Linux/11274/QNLocalVideoTrackStats-Linux)>>
GetLocalAudioTrackStats
* virtual QNLocalAudioTrackStatsMap& GetLocalAudioTrackStats() = 0
* 获取已发布的近端音频轨道统计信息
Returns std::map<std::string,
[QNLocalAudioTrackStats](https://developer.qiniu.com/rtc/11288/QNRTCClient-
Linux/11273/QNLocalAudioTrackStats-Linux)>
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNRTCClient
# QNRTCClient
最近更新时间: 2022-03-28 17:57:26
RTC 核心类,包含加入房间,离开房间,订阅、发布 Track,获取统计信息等功能
Index
Core Methods
* SetClientRole
* SetAutoSubscribe
* Join
* Leave
* GetConnectionState
* Publish
* UnPublish
* Subscribe
* UnSubscribe
* SendCustomMessage
* SetLiveStreamingListener
* StartLiveStreaming[1/2]
* StartLiveStreaming[2/2]
* StopLiveStreaming[1/2]
* StopLiveStreaming[2/2]
* SetTranscodingLiveStreamingTracks
* RemoveTranscodingLiveStreamingTracks
* SetRemoteAudioMixedFrameListener
* GetPublishedTracks
* GetRemoteUsers[1/2]
* GetRemoteUsers[2/2]
* GetRemoteVideoTrackStats
* GetRemoteAudioTrackStats
* GetLocalVideoTrackStats
* GetLocalAudioTrackStats
Core Methods
SetClientRole
* virtual void SetClientRole([QNClientRole](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11263/QNClientRole-Linux) client_role, [QNClientRoleListener](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11264/QNClientRoleListener-Linux)* listener) = 0
* 设置直播场景下的用户角色
该方法在加入频道前后均可调用。
Parameters
* client_role: [QNClientRole](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11263/QNClientRole-Linux)
目标角色
* listener: [QNClientRoleListener](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11264/QNClientRoleListener-Linux)
设置角色结果回调
SetAutoSubscribe
* virtual void SetAutoSubscribe(bool auto_subscribe) = 0
* 设置是否启用自动订阅
当开启此选项后,房间内有任意用户新发布 Track 的时候,会自动订阅此路 Track,订阅成功后,会触发
[QNClientEventListener.OnSubscribed](https://developer.qiniu.com/rtc/11288/QNRTCClient-
Linux/11261) 回调
Parameters
* auto_subscribe: bool
是否自动订阅
Join
* virtual void Join(const std::string& token, const std::string& user_data = "") = 0
* 加入房间
接口调用成功后,将会触发
[QNClientEventListener.OnConnectionStateChanged](https://developer.qiniu.com/rtc/11288/QNRTCClient-
Linux/11261) 回调
> 请确保在
> [QNConnectionState.kDisconnected](https://developer.qiniu.com/rtc/11288/QNRTCClient-
> Linux/11266) 状态下调用该接口加入房间,否则接口调用无效
Parameters
* token: string
房间 Token
* user_data: string
用户信息
Leave
* virtual void Leave() = 0
* 离开房间
成功离开房间后,会触发
[QNClientEventListener.OnConnectionStateChanged](https://developer.qiniu.com/rtc/11288/QNRTCClient-
Linux/11261) 回调
GetConnectionState
* virtual QNConnectionState GetConnectionState() = 0
* 获取当前房间连接状态
Returns [QNConnectionState](https://developer.qiniu.com/rtc/11288/QNRTCClient-
Linux/undefined)
Publish
* virtual void Publish(LocalTrackList& track_list, QNPublishResultCallback* listener) = 0
* 发布本地媒体流,结果通过 [QNPublishResultCallback](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11283/QNPublishResultCallback-Linux) 接口通知
Parameters
* track_list: std::list<[QNLocalTrack](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11208/QNLocalTrack-Linux)*>
要发布的本地 Track 列表
* listener: [QNPublishResultCallback](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11283/QNPublishResultCallback-Linux)
发布结果回调函数
UnPublish
* virtual void UnPublish(LocalTrackList& track_list) = 0
* 取消发布本地媒体列表
Parameters
* track_list: std::list<[QNLocalTrack](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11208/QNLocalTrack-Linux)*>
要取消发布的本地 Track 列表
Subscribe
* virtual void Subscribe(const RemoteTrackList& track_list) = 0
* 订阅远端 Track 列表,订阅成功后,会触发 [QNClientEventListener.OnSubscribed](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11261) 回调
Parameters
* track_list: std::list<shared_ptr<[QNRemoteTrack](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11213/QNRemoteTrack-Linux)>>
要订阅的远端 Track 列表
UnSubscribe
* virtual void UnSubscribe(const RemoteTrackList& track_list) = 0
* 取消订阅远端 Track 列表
Parameters
* track_list: std::list<shared_ptr<[QNRemoteTrack](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11213/QNRemoteTrack-Linux)>>
要取消订阅的远端 Track 列表
SendCustomMessage
* virtual void SendCustomMessage(const std::list<std::string>& users_list, const std::string& message_id, const std::string& message) = 0
* 发送自定义消息到指定用户群,发送成功后,会触发远端用户的 [QNClientEventListener.OnMessageReceived](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11261) 回调接口
Parameters
* users_list: std::list<std::string>
用户 ID 列表
* message_id: string
自定义消息 ID
* message: string
自定义消息内容
SetLiveStreamingListener
* virtual void SetLiveStreamingListener([QNLiveStreamingListener](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11272/QNLiveStreamingListener-Linux)* listener) = 0
* 设置 CDN 转推监听接口
Parameters
* listener: [QNLiveStreamingListener](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11272/QNLiveStreamingListener-Linux)
转推监听接口
StartLiveStreaming[1/2]
* virtual void StartLiveStreaming([QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11268/QNDirectLiveStreamingConfig-Linux)& config) = 0
* 开始单路 CDN 转推
Parameters
* config: [QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11268/QNDirectLiveStreamingConfig-Linux)
单路转推配置
StartLiveStreaming[2/2]
* virtual void StartLiveStreaming([QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11294/QNTranscodingLiveStreamingConfig-Linux)& config) = 0;
* 开始合流转码 CDN 转推
Parameters
* config: [QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11294/QNTranscodingLiveStreamingConfig-Linux)
合流转推配置
StopLiveStreaming[1/2]
* virtual void StopLiveStreaming([QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11268/QNDirectLiveStreamingConfig-Linux)& config) = 0
* 停止单路 CDN 转推
Parameters
* config: [QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11268/QNDirectLiveStreamingConfig-Linux)
单路 CDN 转推配置
StopLiveStreaming[2/2]
* virtual void StopLiveStreaming([QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11294/QNTranscodingLiveStreamingConfig-Linux)& config) = 0
* 停止合流转码 CDN 转推
Parameters
* config: [QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11294/QNTranscodingLiveStreamingConfig-Linux)
合流转推配置
SetTranscodingLiveStreamingTracks
* virtual void SetTranscodingLiveStreamingTracks(std::string& stream_id, QNTranscodeingTrackList& transcoding_track_list) = 0
* 新增、更新合流转推布局配置
> 新增 track 布局以及对已有的 track 的合流布局进行更新均可通过该接口实现,只需修改 transcodingTracks 对应的 track
> 内容即可。
Parameters
* stream_id: string
合流任务 stream id
* transcoding_track_list: std::list<[QNTranscodingLiveStreamingTrack](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11296/QNTranscodingLiveStreamingTrack-Linux)>
待新增、更新的合流转推布局配置
RemoveTranscodingLiveStreamingTracks
* virtual void RemoveTranscodingLiveStreamingTracks(std::string& stream_id, QNTranscodeingTrackList& transcoding_track_list) = 0
* 移除合流转推布局配置
Parameters
* stream_id: string
合流任务 stream id
* transcoding_track_list: std::list<[QNTranscodingLiveStreamingTrack](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11296/QNTranscodingLiveStreamingTrack-Linux)>
待移除合流转推布局配置
SetRemoteAudioMixedFrameListener
* virtual void SetRemoteAudioMixedFrameListener([QNRemoteAudioMixedFrameListener](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11284/QNRemoteAudioMixedFrameListener-Linux)* listener) = 0
* 设置监听远端所有音频 Track 混合后的音频数据
Parameters
* listener: [QNRemoteAudioMixedFrameListener](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11284/QNRemoteAudioMixedFrameListener-Linux)
音频数据监听接口
GetPublishedTracks
* virtual LocalTrackList& GetPublishedTracks() = 0
* 获取所有已经发布的本地 Track
Returns
std::list<[QNLocalTrack](https://developer.qiniu.com/rtc/11288/QNRTCClient-
Linux/11208/QNLocalTrack-Linux)*>
GetRemoteUsers[1/2]
* virtual [QNRemoteUser](https://developer.qiniu.com/rtc/11288/QNRTCClient-Linux/11214/QNRemoteUser-Linux)& GetRemoteUsers(const std::string& user_id) = 0
* 获取对应 ID 的远端用户
Parameters
* user_id: string
远端用户 ID
Returns [QNRemoteUser](https://developer.qiniu.com/rtc/11288/QNRTCClient-
Linux/11214/QNRemoteUser-Linux)
GetRemoteUsers[2/2]
* virtual RemoteUserList& GetRemoteUsers() = 0
* 获取房间内所有的远端用户
Returns
std::list<[QNRemoteUser](https://developer.qiniu.com/rtc/11288/QNRTCClient-
Linux/11214/QNRemoteUser-Linux)>
GetRemoteVideoTrackStats
* virtual QNRemoteVideoTrackStatsMap& GetRemoteVideoTrackStats() = 0
* 获取已订阅的远端视频轨道统计信息
Returns std::map<std::string,
[QNRemoteVideoTrackStats](https://developer.qiniu.com/rtc/11288/QNRTCClient-
Linux/11286/QNRemoteVideoTrackStats-Linux)>
GetRemoteAudioTrackStats
* virtual QNRemoteAudioTrackStatsMap& GetRemoteAudioTrackStats() = 0
* 获取已订阅的远端音频轨道统计信息
Returns std::map<std::string,
[QNRemoteAudioTrackStats](https://developer.qiniu.com/rtc/11288/QNRTCClient-
Linux/11285/QNRemoteAudioTrackStats-Linux)>
GetLocalVideoTrackStats
* virtual QNLocalVideoTracksStatsMap& GetLocalVideoTrackStats() = 0
* 获取已发布的近端视频轨道统计信息
Returns std::map<std::string,
std::list<[QNLocalVideoTrackStats](https://developer.qiniu.com/rtc/11288/QNRTCClient-
Linux/11274/QNLocalVideoTrackStats-Linux)>>
GetLocalAudioTrackStats
* virtual QNLocalAudioTrackStatsMap& GetLocalAudioTrackStats() = 0
* 获取已发布的近端音频轨道统计信息
Returns std::map<std::string,
[QNLocalAudioTrackStats](https://developer.qiniu.com/rtc/11288/QNRTCClient-
Linux/11273/QNLocalAudioTrackStats-Linux)>
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,709 |
QNRTCClientConfig | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNRTCClientConfig
# QNRTCClientConfig
最近更新时间: 2022-03-28 17:44:52
[QNRTCClient](https://developer.qiniu.com/rtc/11289/QNRTCClientConfig-
Linux/11288/QNRTCClient-Linux) 创建配置类,在
[QNRTC](https://developer.qiniu.com/rtc/11289/QNRTCClientConfig-
Linux/11216/QNRTC-Linux).CreateClient 的时候使用
Index
Properties
* mode
* role
Properties
mode
* mode: [QNClientMode](https://developer.qiniu.com/rtc/11289/QNRTCClientConfig-Linux/11262/QNClientMode-Linux)
* 使用场景
role
* role: [QNClientRole](https://developer.qiniu.com/rtc/11289/QNRTCClientConfig-Linux/11263/QNClientRole-Linux)
* 用户角色
角色类型,仅当使用场景为互动直播时才会生效
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNRTCClientConfig
# QNRTCClientConfig
最近更新时间: 2022-03-28 17:44:52
[QNRTCClient](https://developer.qiniu.com/rtc/11289/QNRTCClientConfig-
Linux/11288/QNRTCClient-Linux) 创建配置类,在
[QNRTC](https://developer.qiniu.com/rtc/11289/QNRTCClientConfig-
Linux/11216/QNRTC-Linux).CreateClient 的时候使用
Index
Properties
* mode
* role
Properties
mode
* mode: [QNClientMode](https://developer.qiniu.com/rtc/11289/QNRTCClientConfig-Linux/11262/QNClientMode-Linux)
* 使用场景
role
* role: [QNClientRole](https://developer.qiniu.com/rtc/11289/QNRTCClientConfig-Linux/11263/QNClientRole-Linux)
* 用户角色
角色类型,仅当使用场景为互动直播时才会生效
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,720 |
QNClientMode | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNClientMode
# QNClientMode
最近更新时间: 2022-03-28 17:44:11
使用场景,当前分为通信场景和互动直播场景,在
[QNRTCClientConfig](https://developer.qiniu.com/rtc/11262/QNClientMode-
Linux/11289/QNRTCClientConfig-Linux) 中设置,建议根据不同需求选择不同场景,优化使用体验
Index
Properties
* kRtc
* kLive
Properties
kRtc
* kRtc: QNClientMode
* 通信场景,用于常见的一对一通话或群聊,该场景中的用户均可以发布和订阅音视频轨道
kLive
* kLive: QNClientMode
* 直播场景,有主播和观众两种用户角色,可以通过 [QNRTCClient.SetClientRole](https://developer.qiniu.com/rtc/11262/QNClientMode-Linux/11288) 方法设置用户角色为主播或观众。主播可以发布和订阅音视频轨道,而观众只能订阅音视频轨道,无法发布
> 注意:直播场景中的用户角色默认为观众。如需发布音视频,必须将角色修改为主播
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNClientMode
# QNClientMode
最近更新时间: 2022-03-28 17:44:11
使用场景,当前分为通信场景和互动直播场景,在
[QNRTCClientConfig](https://developer.qiniu.com/rtc/11262/QNClientMode-
Linux/11289/QNRTCClientConfig-Linux) 中设置,建议根据不同需求选择不同场景,优化使用体验
Index
Properties
* kRtc
* kLive
Properties
kRtc
* kRtc: QNClientMode
* 通信场景,用于常见的一对一通话或群聊,该场景中的用户均可以发布和订阅音视频轨道
kLive
* kLive: QNClientMode
* 直播场景,有主播和观众两种用户角色,可以通过 [QNRTCClient.SetClientRole](https://developer.qiniu.com/rtc/11262/QNClientMode-Linux/11288) 方法设置用户角色为主播或观众。主播可以发布和订阅音视频轨道,而观众只能订阅音视频轨道,无法发布
> 注意:直播场景中的用户角色默认为观众。如需发布音视频,必须将角色修改为主播
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,722 |
QNLocalAudioTrack | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNLocalAudioTrack
# QNLocalAudioTrack
最近更新时间: 2022-03-28 22:34:51
本地音频 Track 基类
Hierarchy
* [QNTrack](https://developer.qiniu.com/rtc/11207/QNLocalAudioTrack-Linux/11222/QNTrack-Linux)
* [QNLocalTrack](https://developer.qiniu.com/rtc/11207/QNLocalAudioTrack-Linux/11208/QNLocalTrack-Linux)
* [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11207/QNLocalAudioTrack-Linux/11209/QNLocalVideoTrack-Linux)
* [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11207/QNLocalAudioTrack-Linux/11198/QNCameraVideoTrack-Linux)
* [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11207/QNLocalAudioTrack-Linux/11205/QNCustomVideoTrack-Linux)
* QNLocalAudioTrack
* [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11207/QNLocalAudioTrack-Linux/11210/QNMicrophoneAudioTrack-Linux)
* [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11207/QNLocalAudioTrack-Linux/11203/QNCustomAudioTrack-Linux)
* [QNRemoteTrack](https://developer.qiniu.com/rtc/11207/QNLocalAudioTrack-Linux/11213/QNRemoteTrack-Linux)
* [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11207/QNLocalAudioTrack-Linux/11215/QNRemoteVideoTrack-Linux)
* [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11207/QNLocalAudioTrack-Linux/11212/QNRemoteAudioTrack-Linux)
Index
Core Methods
* GetTrackID
* GetUserID
* GetTag
* IsAudio
* IsVideo
* IsMuted
* SetMuted
* SetAudioFrameListener
* SetVolume
* GetVolumeLevel
Core Methods
GetTrackID
* virtual const std::string& GetTrackID() = 0
* 获取 TrackID
Returns string
GetUserID
* virtual const std::string& GetUserID() = 0
* 获取 UserID
Returns string
GetTag
* virtual const std::string& GetTag() = 0
* 获取 Tag
Returns string
IsAudio
* virtual bool IsAudio() = 0
* 是否为音频 track
Returns bool
IsVideo
* virtual bool IsVideo() = 0
* 是否为视频 track
Returns bool
IsMuted
* virtual bool IsMuted() = 0
* 是否 muted
Returns bool
SetMuted
* virtual void SetMuted(bool muted) = 0
* 设置是否静默该 track,静默后,SDK 将会发送静默帧数据
Parameters
* muted: bool
是否静默
SetAudioFrameListener
* virtual void SetAudioFrameListener([QNAudioFrameListener](https://developer.qiniu.com/rtc/11207/QNLocalAudioTrack-Linux/11189/QNAudioFrameListener-Linux)* listener) = 0
* 设置是音频数据监听
Parameters
* listener: [QNAudioFrameListener](https://developer.qiniu.com/rtc/11207/QNLocalAudioTrack-Linux/11189/QNAudioFrameListener-Linux)
音频数据监听接口
SetVolume
* virtual void SetVolume(double volume) = 0
* 设置采集音频音量(不改变系统设备的音量)
Parameters
* volume: double
音量大小,[1.0-10.0], 默认为 1.0
GetVolumeLevel
* virtual float GetVolumeLevel() = 0
* 获取音频采集的音量
Returns float
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNLocalAudioTrack
# QNLocalAudioTrack
最近更新时间: 2022-03-28 22:34:51
本地音频 Track 基类
Hierarchy
* [QNTrack](https://developer.qiniu.com/rtc/11207/QNLocalAudioTrack-Linux/11222/QNTrack-Linux)
* [QNLocalTrack](https://developer.qiniu.com/rtc/11207/QNLocalAudioTrack-Linux/11208/QNLocalTrack-Linux)
* [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11207/QNLocalAudioTrack-Linux/11209/QNLocalVideoTrack-Linux)
* [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11207/QNLocalAudioTrack-Linux/11198/QNCameraVideoTrack-Linux)
* [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11207/QNLocalAudioTrack-Linux/11205/QNCustomVideoTrack-Linux)
* QNLocalAudioTrack
* [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11207/QNLocalAudioTrack-Linux/11210/QNMicrophoneAudioTrack-Linux)
* [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11207/QNLocalAudioTrack-Linux/11203/QNCustomAudioTrack-Linux)
* [QNRemoteTrack](https://developer.qiniu.com/rtc/11207/QNLocalAudioTrack-Linux/11213/QNRemoteTrack-Linux)
* [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11207/QNLocalAudioTrack-Linux/11215/QNRemoteVideoTrack-Linux)
* [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11207/QNLocalAudioTrack-Linux/11212/QNRemoteAudioTrack-Linux)
Index
Core Methods
* GetTrackID
* GetUserID
* GetTag
* IsAudio
* IsVideo
* IsMuted
* SetMuted
* SetAudioFrameListener
* SetVolume
* GetVolumeLevel
Core Methods
GetTrackID
* virtual const std::string& GetTrackID() = 0
* 获取 TrackID
Returns string
GetUserID
* virtual const std::string& GetUserID() = 0
* 获取 UserID
Returns string
GetTag
* virtual const std::string& GetTag() = 0
* 获取 Tag
Returns string
IsAudio
* virtual bool IsAudio() = 0
* 是否为音频 track
Returns bool
IsVideo
* virtual bool IsVideo() = 0
* 是否为视频 track
Returns bool
IsMuted
* virtual bool IsMuted() = 0
* 是否 muted
Returns bool
SetMuted
* virtual void SetMuted(bool muted) = 0
* 设置是否静默该 track,静默后,SDK 将会发送静默帧数据
Parameters
* muted: bool
是否静默
SetAudioFrameListener
* virtual void SetAudioFrameListener([QNAudioFrameListener](https://developer.qiniu.com/rtc/11207/QNLocalAudioTrack-Linux/11189/QNAudioFrameListener-Linux)* listener) = 0
* 设置是音频数据监听
Parameters
* listener: [QNAudioFrameListener](https://developer.qiniu.com/rtc/11207/QNLocalAudioTrack-Linux/11189/QNAudioFrameListener-Linux)
音频数据监听接口
SetVolume
* virtual void SetVolume(double volume) = 0
* 设置采集音频音量(不改变系统设备的音量)
Parameters
* volume: double
音量大小,[1.0-10.0], 默认为 1.0
GetVolumeLevel
* virtual float GetVolumeLevel() = 0
* 获取音频采集的音量
Returns float
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,724 |
QNMicrophoneAudioTrack | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNMicrophoneAudioTrack
# QNMicrophoneAudioTrack
最近更新时间: 2022-07-13 23:40:34
本地音频麦克风 Track 类
Hierarchy
* [QNTrack](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11222/QNTrack-Linux)
* [QNLocalTrack](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11208/QNLocalTrack-Linux)
* [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11209/QNLocalVideoTrack-Linux)
* [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11198/QNCameraVideoTrack-Linux)
* [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11205/QNCustomVideoTrack-Linux)
* [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11207/QNLocalAudioTrack-Linux)
* QNMicrophoneAudioTrack
* [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11203/QNCustomAudioTrack-Linux)
* [QNRemoteTrack](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11213/QNRemoteTrack-Linux)
* [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11215/QNRemoteVideoTrack-Linux)
* [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11212/QNRemoteAudioTrack-Linux)
Index
Core Methods
* GetTrackID
* GetUserID
* GetTag
* IsAudio
* IsVideo
* IsMuted
* SetMuted
* SetAudioFrameListener
* SetVolume
* GetVolumeLevel
* CreateAudioMusicMixer
* CreateAudioEffectMixer
* DestroyAudioMusicMixer
* DestroyAudioEffectMixer
Core Methods
GetTrackID
* virtual const std::string& GetTrackID() = 0
* 获取 TrackID
Returns string
GetUserID
* virtual const std::string& GetUserID() = 0
* 获取 UserID
Returns string
GetTag
* virtual const std::string& GetTag() = 0
* 获取 Tag
Returns string
IsAudio
* virtual bool IsAudio() = 0
* 是否为音频 track
Returns bool
IsVideo
* virtual bool IsVideo() = 0
* 是否为视频 track
Returns bool
IsMuted
* virtual bool IsMuted() = 0
* 是否 muted
Returns bool
SetMuted
* virtual void SetMuted(bool muted) = 0
* 设置是否静默该 track,静默后,SDK 将会发送静默帧数据
Parameters
* muted: bool
是否静默
SetAudioFrameListener
* virtual void SetAudioFrameListener([QNAudioFrameListener](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11189/QNAudioFrameListener-Linux)* listener) = 0
* 设置是音频数据监听
Parameters
* listener: [QNAudioFrameListener](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11189/QNAudioFrameListener-Linux)
音频数据监听接口
SetVolume
* virtual void SetVolume(double volume) = 0
* 设置采集音频音量(不改变系统设备的音量)
Parameters
* volume: double
音量大小,[1.0-10.0], 默认为 1.0
GetVolumeLevel
* virtual float GetVolumeLevel() = 0
* 获取音频采集的音量
Returns float
CreateAudioMusicMixer
* virtual [QNAudioMusicMixer](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11989/QNAudioMusicMixer)* CreateAudioMusicMixer(const std::string& music_path, [QNAudioMusicMixerListener](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11990/QNAudioMusicMixerListener)* listener) = 0
* 创建背景音乐混音控制器对象
支持本地和在线文件,支持的文件格式为:aac、mp3、mp4、ogg、opus、wav、m4a、flac
> 注意:
>
> 1\. 背景音乐混音仅支持同时混合一路背景音乐,若需要切换背景音乐,重新调用本接口创建
> [QNAudioMusicMixer](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-
> Linux/11989/QNAudioMusicMixer) 即可
>
> 2\. 建议使用本地文件进行混音,以避免网络环境差引起的混音异常
>
> 3\.
> 若您希望在混合背景音乐的同时添加音效,可参考音效混音相关接口([QNAudioEffectMixer](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-
> Linux/11986/QNAudioEffectMixer))
Parameters
* music_path: String
音频文件路径,支持本地文件和在线文件
* listener: [QNAudioMusicMixerListener](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11990/QNAudioMusicMixerListener)
混音控制器监听接口
Returns
[QNAudioMusicMixer](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-
Linux/11989/QNAudioMusicMixer)
CreateAudioEffectMixer
* virtual [QNAudioEffectMixer](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11986/QNAudioEffectMixer)* CreateAudioEffectMixer([QNAudioEffectMixerListener](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11988/QNAudioEffectMixerListener)* listener) = 0
* 创建音效混音控制器对象
> 音效混音支持同时混合多路音效文件
Parameters
* listener: [QNAudioEffectMixerListener](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11988/QNAudioEffectMixerListener)
音效混音控制器监听接口
Returns
[QNAudioEffectMixer](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-
Linux/11986/QNAudioEffectMixer)
DestroyAudioMusicMixer
* virtual void DestroyAudioMusicMixer([QNAudioMusicMixer](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11989/QNAudioMusicMixer)* mixer) = 0
* 销毁 [QNAudioMusicMixer](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11989/QNAudioMusicMixer) 实例
DestroyAudioEffectMixer
* virtual void DestroyAudioEffectMixer([QNAudioEffectMixer](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11986/QNAudioEffectMixer)* mixer) = 0
* 销毁 [QNAudioEffectMixer](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11986/QNAudioEffectMixer) 实例
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNMicrophoneAudioTrack
# QNMicrophoneAudioTrack
最近更新时间: 2022-07-13 23:40:34
本地音频麦克风 Track 类
Hierarchy
* [QNTrack](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11222/QNTrack-Linux)
* [QNLocalTrack](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11208/QNLocalTrack-Linux)
* [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11209/QNLocalVideoTrack-Linux)
* [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11198/QNCameraVideoTrack-Linux)
* [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11205/QNCustomVideoTrack-Linux)
* [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11207/QNLocalAudioTrack-Linux)
* QNMicrophoneAudioTrack
* [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11203/QNCustomAudioTrack-Linux)
* [QNRemoteTrack](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11213/QNRemoteTrack-Linux)
* [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11215/QNRemoteVideoTrack-Linux)
* [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11212/QNRemoteAudioTrack-Linux)
Index
Core Methods
* GetTrackID
* GetUserID
* GetTag
* IsAudio
* IsVideo
* IsMuted
* SetMuted
* SetAudioFrameListener
* SetVolume
* GetVolumeLevel
* CreateAudioMusicMixer
* CreateAudioEffectMixer
* DestroyAudioMusicMixer
* DestroyAudioEffectMixer
Core Methods
GetTrackID
* virtual const std::string& GetTrackID() = 0
* 获取 TrackID
Returns string
GetUserID
* virtual const std::string& GetUserID() = 0
* 获取 UserID
Returns string
GetTag
* virtual const std::string& GetTag() = 0
* 获取 Tag
Returns string
IsAudio
* virtual bool IsAudio() = 0
* 是否为音频 track
Returns bool
IsVideo
* virtual bool IsVideo() = 0
* 是否为视频 track
Returns bool
IsMuted
* virtual bool IsMuted() = 0
* 是否 muted
Returns bool
SetMuted
* virtual void SetMuted(bool muted) = 0
* 设置是否静默该 track,静默后,SDK 将会发送静默帧数据
Parameters
* muted: bool
是否静默
SetAudioFrameListener
* virtual void SetAudioFrameListener([QNAudioFrameListener](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11189/QNAudioFrameListener-Linux)* listener) = 0
* 设置是音频数据监听
Parameters
* listener: [QNAudioFrameListener](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11189/QNAudioFrameListener-Linux)
音频数据监听接口
SetVolume
* virtual void SetVolume(double volume) = 0
* 设置采集音频音量(不改变系统设备的音量)
Parameters
* volume: double
音量大小,[1.0-10.0], 默认为 1.0
GetVolumeLevel
* virtual float GetVolumeLevel() = 0
* 获取音频采集的音量
Returns float
CreateAudioMusicMixer
* virtual [QNAudioMusicMixer](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11989/QNAudioMusicMixer)* CreateAudioMusicMixer(const std::string& music_path, [QNAudioMusicMixerListener](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11990/QNAudioMusicMixerListener)* listener) = 0
* 创建背景音乐混音控制器对象
支持本地和在线文件,支持的文件格式为:aac、mp3、mp4、ogg、opus、wav、m4a、flac
> 注意:
>
> 1\. 背景音乐混音仅支持同时混合一路背景音乐,若需要切换背景音乐,重新调用本接口创建
> [QNAudioMusicMixer](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-
> Linux/11989/QNAudioMusicMixer) 即可
>
> 2\. 建议使用本地文件进行混音,以避免网络环境差引起的混音异常
>
> 3\.
> 若您希望在混合背景音乐的同时添加音效,可参考音效混音相关接口([QNAudioEffectMixer](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-
> Linux/11986/QNAudioEffectMixer))
Parameters
* music_path: String
音频文件路径,支持本地文件和在线文件
* listener: [QNAudioMusicMixerListener](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11990/QNAudioMusicMixerListener)
混音控制器监听接口
Returns
[QNAudioMusicMixer](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-
Linux/11989/QNAudioMusicMixer)
CreateAudioEffectMixer
* virtual [QNAudioEffectMixer](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11986/QNAudioEffectMixer)* CreateAudioEffectMixer([QNAudioEffectMixerListener](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11988/QNAudioEffectMixerListener)* listener) = 0
* 创建音效混音控制器对象
> 音效混音支持同时混合多路音效文件
Parameters
* listener: [QNAudioEffectMixerListener](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11988/QNAudioEffectMixerListener)
音效混音控制器监听接口
Returns
[QNAudioEffectMixer](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-
Linux/11986/QNAudioEffectMixer)
DestroyAudioMusicMixer
* virtual void DestroyAudioMusicMixer([QNAudioMusicMixer](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11989/QNAudioMusicMixer)* mixer) = 0
* 销毁 [QNAudioMusicMixer](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11989/QNAudioMusicMixer) 实例
DestroyAudioEffectMixer
* virtual void DestroyAudioEffectMixer([QNAudioEffectMixer](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11986/QNAudioEffectMixer)* mixer) = 0
* 销毁 [QNAudioEffectMixer](https://developer.qiniu.com/rtc/11210/QNMicrophoneAudioTrack-Linux/11986/QNAudioEffectMixer) 实例
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,728 |
QNCameraVideoTrack | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNCameraVideoTrack
# QNCameraVideoTrack
最近更新时间: 2022-03-28 17:53:28
本地视频相机 Track 类
Hierarchy
* [QNTrack](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11222/QNTrack-Linux)
* [QNLocalTrack](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11208/QNLocalTrack-Linux)
* [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11209/QNLocalVideoTrack-Linux)
* QNCameraVideoTrack
* [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11205/QNCustomVideoTrack-Linux)
* [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11207/QNLocalAudioTrack-Linux)
* [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11210/QNMicrophoneAudioTrack-Linux)
* [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11203/QNCustomAudioTrack-Linux)
* [QNRemoteTrack](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11213/QNRemoteTrack-Linux)
* [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11215/QNRemoteVideoTrack-Linux)
* [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11212/QNRemoteAudioTrack-Linux)
Index
Core Methods
* GetTrackID
* GetUserID
* GetTag
* IsAudio
* IsVideo
* IsMuted
* SetMuted
* SetVideoFrameListener
* SendSEI
* StartCrop
* StopCrop
* StartScale
* StopScale
* StartCapture
* StopCapture
* SetMirror
* PushImage
Core Methods
GetTrackID
* virtual const std::string& GetTrackID() = 0
* 获取 TrackID
Returns string
GetUserID
* virtual const std::string& GetUserID() = 0
* 获取 UserID
Returns string
GetTag
* virtual const std::string& GetTag() = 0
* 获取 Tag
Returns string
IsAudio
* virtual bool IsAudio() = 0
* 是否为音频 track
Returns bool
IsVideo
* virtual bool IsVideo() = 0
* 是否为视频 track
Returns bool
IsMuted
* virtual bool IsMuted() = 0
* 是否 muted
Returns bool
SetMuted
* virtual void SetMuted(bool muted) = 0
* 设置是否静默该 track,静默后,SDK 将会发送静默帧数据
Parameters
* muted: bool
是否静默
SetVideoFrameListener
* virtual void SetVideoFrameListener([QNVideoFrameListener](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11226/QNVideoFrameListener-Linux)* listener) = 0
* 设置视频数据监听
Parameters
* listener: [QNVideoFrameListener](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11226/QNVideoFrameListener-Linux)
视频数据监听接口
SendSEI
* virtual void SendSEI(std::string& message,std::string& uuid,int32_t repeat_count) = 0
* 发送 SEI
Parameters
* message: string
消息内容
* uuid: string
唯一 ID
* repeat_count: int
重复次数, -1 为每一帧都发送
StartCrop
* virtual void StartCrop(uint32_t crop_x,uint32_t crop_y,int32_t crop_width,int32_t crop_height) = 0
* 开启原始帧裁剪功能,设置参数要求如下,如果设置不正确,则输出原始图像
Parameters
* crop_x: uint32_t
开始裁减的 X 坐标点,原点为左上角,必须落在原图之内
* crop_y: uint32_t
开始裁减的 Y 坐标点,原点为左上角,必须落在原图之内
* crop_width: int32_t
目标图像宽度,必须为 4 的整数倍,如果是裁剪模式,crop_x和 crop_y,裁剪图像必须在原始图像之内
* crop_height: int32_t
目标图像高度,必须为 4 的整数倍,如果是裁剪模式,crop_x 和 crop_y,裁剪图像必须在原始图像之内
StopCrop
* virtual void StopCrop() = 0
* 关闭裁剪功能
StartScale
* virtual void StartScale(int32_t dst_width, int32_t dst_height) = 0
* 开启原始帧缩放功能,设置参数要求如下,如果设置不正确,则输出原始图像
Parameters
* dst_width: int32_t
目标图像宽度,必须为 4 的整数倍
* dst_height: int32_t
目标图像高度,必须为 4 的整数倍
StopScale
* virtual void StopScale() = 0
* 关闭缩放功能
StartCapture
* virtual void StartCapture() = 0
* 开启摄像头采集
StopCapture
* virtual void StopCapture() = 0
* 关闭摄像头采集
SetMirror
* virtual void SetMirror(bool mirror) = 0
* 设置本地采集画面是否镜像,开启镜像后,订阅端看到的是镜像画面
Parameters
* mirror: bool
是否镜像
PushImage
* virtual void PushImage(void* object, [QNImageType](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11270/QNImageType-Linux) type) = 0
* 将摄像头采集流替换为图片流,此接口需要在摄像头推流成功后调用
Parameters
* object: void*
object 推送图片的对象,可以是文件对象、文件路径、url,Window 平台只支持文件路径, 设置为 nullptr
时,取消推送图片,关闭图片推送,恢复摄像头采集画面
* type: [QNImageType](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11270/QNImageType-Linux)
图片格式
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNCameraVideoTrack
# QNCameraVideoTrack
最近更新时间: 2022-03-28 17:53:28
本地视频相机 Track 类
Hierarchy
* [QNTrack](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11222/QNTrack-Linux)
* [QNLocalTrack](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11208/QNLocalTrack-Linux)
* [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11209/QNLocalVideoTrack-Linux)
* QNCameraVideoTrack
* [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11205/QNCustomVideoTrack-Linux)
* [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11207/QNLocalAudioTrack-Linux)
* [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11210/QNMicrophoneAudioTrack-Linux)
* [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11203/QNCustomAudioTrack-Linux)
* [QNRemoteTrack](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11213/QNRemoteTrack-Linux)
* [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11215/QNRemoteVideoTrack-Linux)
* [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11212/QNRemoteAudioTrack-Linux)
Index
Core Methods
* GetTrackID
* GetUserID
* GetTag
* IsAudio
* IsVideo
* IsMuted
* SetMuted
* SetVideoFrameListener
* SendSEI
* StartCrop
* StopCrop
* StartScale
* StopScale
* StartCapture
* StopCapture
* SetMirror
* PushImage
Core Methods
GetTrackID
* virtual const std::string& GetTrackID() = 0
* 获取 TrackID
Returns string
GetUserID
* virtual const std::string& GetUserID() = 0
* 获取 UserID
Returns string
GetTag
* virtual const std::string& GetTag() = 0
* 获取 Tag
Returns string
IsAudio
* virtual bool IsAudio() = 0
* 是否为音频 track
Returns bool
IsVideo
* virtual bool IsVideo() = 0
* 是否为视频 track
Returns bool
IsMuted
* virtual bool IsMuted() = 0
* 是否 muted
Returns bool
SetMuted
* virtual void SetMuted(bool muted) = 0
* 设置是否静默该 track,静默后,SDK 将会发送静默帧数据
Parameters
* muted: bool
是否静默
SetVideoFrameListener
* virtual void SetVideoFrameListener([QNVideoFrameListener](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11226/QNVideoFrameListener-Linux)* listener) = 0
* 设置视频数据监听
Parameters
* listener: [QNVideoFrameListener](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11226/QNVideoFrameListener-Linux)
视频数据监听接口
SendSEI
* virtual void SendSEI(std::string& message,std::string& uuid,int32_t repeat_count) = 0
* 发送 SEI
Parameters
* message: string
消息内容
* uuid: string
唯一 ID
* repeat_count: int
重复次数, -1 为每一帧都发送
StartCrop
* virtual void StartCrop(uint32_t crop_x,uint32_t crop_y,int32_t crop_width,int32_t crop_height) = 0
* 开启原始帧裁剪功能,设置参数要求如下,如果设置不正确,则输出原始图像
Parameters
* crop_x: uint32_t
开始裁减的 X 坐标点,原点为左上角,必须落在原图之内
* crop_y: uint32_t
开始裁减的 Y 坐标点,原点为左上角,必须落在原图之内
* crop_width: int32_t
目标图像宽度,必须为 4 的整数倍,如果是裁剪模式,crop_x和 crop_y,裁剪图像必须在原始图像之内
* crop_height: int32_t
目标图像高度,必须为 4 的整数倍,如果是裁剪模式,crop_x 和 crop_y,裁剪图像必须在原始图像之内
StopCrop
* virtual void StopCrop() = 0
* 关闭裁剪功能
StartScale
* virtual void StartScale(int32_t dst_width, int32_t dst_height) = 0
* 开启原始帧缩放功能,设置参数要求如下,如果设置不正确,则输出原始图像
Parameters
* dst_width: int32_t
目标图像宽度,必须为 4 的整数倍
* dst_height: int32_t
目标图像高度,必须为 4 的整数倍
StopScale
* virtual void StopScale() = 0
* 关闭缩放功能
StartCapture
* virtual void StartCapture() = 0
* 开启摄像头采集
StopCapture
* virtual void StopCapture() = 0
* 关闭摄像头采集
SetMirror
* virtual void SetMirror(bool mirror) = 0
* 设置本地采集画面是否镜像,开启镜像后,订阅端看到的是镜像画面
Parameters
* mirror: bool
是否镜像
PushImage
* virtual void PushImage(void* object, [QNImageType](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11270/QNImageType-Linux) type) = 0
* 将摄像头采集流替换为图片流,此接口需要在摄像头推流成功后调用
Parameters
* object: void*
object 推送图片的对象,可以是文件对象、文件路径、url,Window 平台只支持文件路径, 设置为 nullptr
时,取消推送图片,关闭图片推送,恢复摄像头采集画面
* type: [QNImageType](https://developer.qiniu.com/rtc/11198/QNCameraVideoTrack-Linux/11270/QNImageType-Linux)
图片格式
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,735 |
QNCustomAudioTrack | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNCustomAudioTrack
# QNCustomAudioTrack
最近更新时间: 2022-03-28 22:33:11
本地音频自定义导入 Track 类
Hierarchy
* [QNTrack](https://developer.qiniu.com/rtc/11203/QNCustomAudioTrack-Linux/11222/QNTrack-Linux)
* [QNLocalTrack](https://developer.qiniu.com/rtc/11203/QNCustomAudioTrack-Linux/11208/QNLocalTrack-Linux)
* [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11203/QNCustomAudioTrack-Linux/11209/QNLocalVideoTrack-Linux)
* [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11203/QNCustomAudioTrack-Linux/11198/QNCameraVideoTrack-Linux)
* [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11203/QNCustomAudioTrack-Linux/11205/QNCustomVideoTrack-Linux)
* [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11203/QNCustomAudioTrack-Linux/11207/QNLocalAudioTrack-Linux)
* [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11203/QNCustomAudioTrack-Linux/11210/QNMicrophoneAudioTrack-Linux)
* QNCustomAudioTrack
* [QNRemoteTrack](https://developer.qiniu.com/rtc/11203/QNCustomAudioTrack-Linux/11213/QNRemoteTrack-Linux)
* [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11203/QNCustomAudioTrack-Linux/11215/QNRemoteVideoTrack-Linux)
* [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11203/QNCustomAudioTrack-Linux/11212/QNRemoteAudioTrack-Linux)
Index
Core Methods
* GetTrackID
* GetUserID
* GetTag
* IsAudio
* IsVideo
* IsMuted
* SetMuted
* SetAudioFrameListener
* SetVolume
* GetVolumeLevel
* PushAudioFrame
Core Methods
GetTrackID
* virtual const std::string& GetTrackID() = 0
* 获取 TrackID
Returns string
GetUserID
* virtual const std::string& GetUserID() = 0
* 获取 UserID
Returns string
GetTag
* virtual const std::string& GetTag() = 0
* 获取 Tag
Returns string
IsAudio
* virtual bool IsAudio() = 0
* 是否为音频 track
Returns bool
IsVideo
* virtual bool IsVideo() = 0
* 是否为视频 track
Returns bool
IsMuted
* virtual bool IsMuted() = 0
* 是否 muted
Returns bool
SetMuted
* virtual void SetMuted(bool muted) = 0
* 设置是否静默该 track,静默后,SDK 将会发送静默帧数据
Parameters
* muted: bool
是否静默
SetAudioFrameListener
* virtual void SetAudioFrameListener([QNAudioFrameListener](https://developer.qiniu.com/rtc/11203/QNCustomAudioTrack-Linux/undefined)* listener) = 0
* 设置是音频数据监听
Parameters
* listener: [QNAudioFrameListener](https://developer.qiniu.com/rtc/11203/QNCustomAudioTrack-Linux/undefined)
音频数据监听接口
SetVolume
* virtual void SetVolume(double volume) = 0
* 设置采集音频音量(不改变系统设备的音量)
Parameters
* volume: double
音量大小,[1.0-10.0], 默认为 1.0
GetVolumeLevel
* virtual float GetVolumeLevel() = 0
* 获取音频采集的音量
Returns float
PushAudioFrame
* virtual int32_t PushAudioFrame(const uint8_t* data,uint32_t data_size,uint32_t bits_per_sample,uint32_t sample_rate,uint32_t channels) = 0
* 推送自定义音频帧
Parameters
* data: uint8_t*
音频数据
* data_size: uint32_t
数据长度
* bits_per_sample: uint32_t
位宽,即每个采样点占用位数
* sample_rate: uint32_t
采样率
* channels: uint32_t
声道数
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNCustomAudioTrack
# QNCustomAudioTrack
最近更新时间: 2022-03-28 22:33:11
本地音频自定义导入 Track 类
Hierarchy
* [QNTrack](https://developer.qiniu.com/rtc/11203/QNCustomAudioTrack-Linux/11222/QNTrack-Linux)
* [QNLocalTrack](https://developer.qiniu.com/rtc/11203/QNCustomAudioTrack-Linux/11208/QNLocalTrack-Linux)
* [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11203/QNCustomAudioTrack-Linux/11209/QNLocalVideoTrack-Linux)
* [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11203/QNCustomAudioTrack-Linux/11198/QNCameraVideoTrack-Linux)
* [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11203/QNCustomAudioTrack-Linux/11205/QNCustomVideoTrack-Linux)
* [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11203/QNCustomAudioTrack-Linux/11207/QNLocalAudioTrack-Linux)
* [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11203/QNCustomAudioTrack-Linux/11210/QNMicrophoneAudioTrack-Linux)
* QNCustomAudioTrack
* [QNRemoteTrack](https://developer.qiniu.com/rtc/11203/QNCustomAudioTrack-Linux/11213/QNRemoteTrack-Linux)
* [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11203/QNCustomAudioTrack-Linux/11215/QNRemoteVideoTrack-Linux)
* [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11203/QNCustomAudioTrack-Linux/11212/QNRemoteAudioTrack-Linux)
Index
Core Methods
* GetTrackID
* GetUserID
* GetTag
* IsAudio
* IsVideo
* IsMuted
* SetMuted
* SetAudioFrameListener
* SetVolume
* GetVolumeLevel
* PushAudioFrame
Core Methods
GetTrackID
* virtual const std::string& GetTrackID() = 0
* 获取 TrackID
Returns string
GetUserID
* virtual const std::string& GetUserID() = 0
* 获取 UserID
Returns string
GetTag
* virtual const std::string& GetTag() = 0
* 获取 Tag
Returns string
IsAudio
* virtual bool IsAudio() = 0
* 是否为音频 track
Returns bool
IsVideo
* virtual bool IsVideo() = 0
* 是否为视频 track
Returns bool
IsMuted
* virtual bool IsMuted() = 0
* 是否 muted
Returns bool
SetMuted
* virtual void SetMuted(bool muted) = 0
* 设置是否静默该 track,静默后,SDK 将会发送静默帧数据
Parameters
* muted: bool
是否静默
SetAudioFrameListener
* virtual void SetAudioFrameListener([QNAudioFrameListener](https://developer.qiniu.com/rtc/11203/QNCustomAudioTrack-Linux/undefined)* listener) = 0
* 设置是音频数据监听
Parameters
* listener: [QNAudioFrameListener](https://developer.qiniu.com/rtc/11203/QNCustomAudioTrack-Linux/undefined)
音频数据监听接口
SetVolume
* virtual void SetVolume(double volume) = 0
* 设置采集音频音量(不改变系统设备的音量)
Parameters
* volume: double
音量大小,[1.0-10.0], 默认为 1.0
GetVolumeLevel
* virtual float GetVolumeLevel() = 0
* 获取音频采集的音量
Returns float
PushAudioFrame
* virtual int32_t PushAudioFrame(const uint8_t* data,uint32_t data_size,uint32_t bits_per_sample,uint32_t sample_rate,uint32_t channels) = 0
* 推送自定义音频帧
Parameters
* data: uint8_t*
音频数据
* data_size: uint32_t
数据长度
* bits_per_sample: uint32_t
位宽,即每个采样点占用位数
* sample_rate: uint32_t
采样率
* channels: uint32_t
声道数
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,741 |
QNRemoteTrack | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNRemoteTrack
# QNRemoteTrack
最近更新时间: 2022-03-28 17:55:08
音视频远端 Track 基类
Hierarchy
* [QNTrack](https://developer.qiniu.com/rtc/11213/QNRemoteTrack-Linux/11222/QNTrack-Linux)
* [QNLocalTrack](https://developer.qiniu.com/rtc/11213/QNRemoteTrack-Linux/11208/QNLocalTrack-Linux)
* [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11213/QNRemoteTrack-Linux/11209/QNLocalVideoTrack-Linux)
* [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11213/QNRemoteTrack-Linux/11198/QNCameraVideoTrack-Linux)
* [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11213/QNRemoteTrack-Linux/11205/QNCustomVideoTrack-Linux)
* [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11213/QNRemoteTrack-Linux/11207/QNLocalAudioTrack-Linux)
* [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11213/QNRemoteTrack-Linux/11210/QNMicrophoneAudioTrack-Linux)
* [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11213/QNRemoteTrack-Linux/11203/QNCustomAudioTrack-Linux)
* QNRemoteTrack
* [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11213/QNRemoteTrack-Linux/11215/QNRemoteVideoTrack-Linux)
* [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11213/QNRemoteTrack-Linux/11212/QNRemoteAudioTrack-Linux)
Index
Core Methods
* GetTrackID
* GetUserID
* GetTag
* IsAudio
* IsVideo
* IsMuted
* SetTrackInfoChangedListener
* IsSubscribed
Core Methods
GetTrackID
* virtual const std::string& GetTrackID() = 0
* 获取 TrackID
Returns string
GetUserID
* virtual const std::string& GetUserID() = 0
* 获取 UserID
Returns string
GetTag
* virtual const std::string& GetTag() = 0
* 获取 Tag
Returns string
IsAudio
* virtual bool IsAudio() = 0
* 是否为音频 track
Returns bool
IsVideo
* virtual bool IsVideo() = 0
* 是否为视频 track
Returns bool
IsMuted
* virtual bool IsMuted() = 0
* 是否 muted
Returns bool
SetTrackInfoChangedListener
* virtual void SetTrackInfoChangedListener([QNTrackInfoChangedListener](https://developer.qiniu.com/rtc/11213/QNRemoteTrack-Linux/11223/QNTrackInfoChangedListener-Linux)* listener) = 0
* 设置当前轨道信息变化监听器
Parameters
* listener: [QNTrackInfoChangedListener](https://developer.qiniu.com/rtc/11213/QNRemoteTrack-Linux/11223/QNTrackInfoChangedListener-Linux)
轨道信息变化监听器
IsSubscribed
* virtual bool IsSubscribed() = 0;
* 该 Track 是否被订阅
Returns bool
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNRemoteTrack
# QNRemoteTrack
最近更新时间: 2022-03-28 17:55:08
音视频远端 Track 基类
Hierarchy
* [QNTrack](https://developer.qiniu.com/rtc/11213/QNRemoteTrack-Linux/11222/QNTrack-Linux)
* [QNLocalTrack](https://developer.qiniu.com/rtc/11213/QNRemoteTrack-Linux/11208/QNLocalTrack-Linux)
* [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11213/QNRemoteTrack-Linux/11209/QNLocalVideoTrack-Linux)
* [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11213/QNRemoteTrack-Linux/11198/QNCameraVideoTrack-Linux)
* [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11213/QNRemoteTrack-Linux/11205/QNCustomVideoTrack-Linux)
* [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11213/QNRemoteTrack-Linux/11207/QNLocalAudioTrack-Linux)
* [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11213/QNRemoteTrack-Linux/11210/QNMicrophoneAudioTrack-Linux)
* [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11213/QNRemoteTrack-Linux/11203/QNCustomAudioTrack-Linux)
* QNRemoteTrack
* [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11213/QNRemoteTrack-Linux/11215/QNRemoteVideoTrack-Linux)
* [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11213/QNRemoteTrack-Linux/11212/QNRemoteAudioTrack-Linux)
Index
Core Methods
* GetTrackID
* GetUserID
* GetTag
* IsAudio
* IsVideo
* IsMuted
* SetTrackInfoChangedListener
* IsSubscribed
Core Methods
GetTrackID
* virtual const std::string& GetTrackID() = 0
* 获取 TrackID
Returns string
GetUserID
* virtual const std::string& GetUserID() = 0
* 获取 UserID
Returns string
GetTag
* virtual const std::string& GetTag() = 0
* 获取 Tag
Returns string
IsAudio
* virtual bool IsAudio() = 0
* 是否为音频 track
Returns bool
IsVideo
* virtual bool IsVideo() = 0
* 是否为视频 track
Returns bool
IsMuted
* virtual bool IsMuted() = 0
* 是否 muted
Returns bool
SetTrackInfoChangedListener
* virtual void SetTrackInfoChangedListener([QNTrackInfoChangedListener](https://developer.qiniu.com/rtc/11213/QNRemoteTrack-Linux/11223/QNTrackInfoChangedListener-Linux)* listener) = 0
* 设置当前轨道信息变化监听器
Parameters
* listener: [QNTrackInfoChangedListener](https://developer.qiniu.com/rtc/11213/QNRemoteTrack-Linux/11223/QNTrackInfoChangedListener-Linux)
轨道信息变化监听器
IsSubscribed
* virtual bool IsSubscribed() = 0;
* 该 Track 是否被订阅
Returns bool
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,745 |
QNTranscodingLiveStreamingConfig | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNTranscodingLiveStreamingConfig
# QNTranscodingLiveStreamingConfig
最近更新时间: 2022-07-13 23:38:16
自定义合流配置信息
Index
Properties
* stream_id
* publish_url
* merge_background
* merge_watermark
* width
* height
* fps
* bitrate
* min_bitrate
* max_bitrate
* is_audio_only
* stretch_mode
Properties
stream_id
* stream_id: string
* 流任务id,保证唯一
publish_url
* publish_url: string
* 自定义合流推流地址
merge_background
* merge_background: [QNTranscodingLiveStreamingImage](https://developer.qiniu.com/rtc/11294/QNTranscodingLiveStreamingConfig-Linux/11295/QNTranscodingLiveStreamingImage-Linux)
* 合流背景
merge_watermark
* merge_watermark: std::list<[QNTranscodingLiveStreamingImage](https://developer.qiniu.com/rtc/11294/QNTranscodingLiveStreamingConfig-Linux/11295/QNTranscodingLiveStreamingImage-Linux)>
* 合流水印
width
* width: int32_t
* 合流画布宽
height
* height: int32_t
* 合流画布高
fps
* fps: int32_t
* 合流帧率
bitrate
* bitrate: int32_t
* 合流码率 bps
min_bitrate
* min_bitrate: int32_t
* 最小码率
max_bitrate
* max_bitrate: int32_t
* 最大码率
is_audio_only
* is_audio_only: bool
* 是否为纯音频
stretch_mode
* stretch_mode: [QNStretchMode](https://developer.qiniu.com/rtc/11294/QNTranscodingLiveStreamingConfig-Linux/11292/QNStretchMode-Linux)
* 合流画面填充模式
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNTranscodingLiveStreamingConfig
# QNTranscodingLiveStreamingConfig
最近更新时间: 2022-07-13 23:38:16
自定义合流配置信息
Index
Properties
* stream_id
* publish_url
* merge_background
* merge_watermark
* width
* height
* fps
* bitrate
* min_bitrate
* max_bitrate
* is_audio_only
* stretch_mode
Properties
stream_id
* stream_id: string
* 流任务id,保证唯一
publish_url
* publish_url: string
* 自定义合流推流地址
merge_background
* merge_background: [QNTranscodingLiveStreamingImage](https://developer.qiniu.com/rtc/11294/QNTranscodingLiveStreamingConfig-Linux/11295/QNTranscodingLiveStreamingImage-Linux)
* 合流背景
merge_watermark
* merge_watermark: std::list<[QNTranscodingLiveStreamingImage](https://developer.qiniu.com/rtc/11294/QNTranscodingLiveStreamingConfig-Linux/11295/QNTranscodingLiveStreamingImage-Linux)>
* 合流水印
width
* width: int32_t
* 合流画布宽
height
* height: int32_t
* 合流画布高
fps
* fps: int32_t
* 合流帧率
bitrate
* bitrate: int32_t
* 合流码率 bps
min_bitrate
* min_bitrate: int32_t
* 最小码率
max_bitrate
* max_bitrate: int32_t
* 最大码率
is_audio_only
* is_audio_only: bool
* 是否为纯音频
stretch_mode
* stretch_mode: [QNStretchMode](https://developer.qiniu.com/rtc/11294/QNTranscodingLiveStreamingConfig-Linux/11292/QNStretchMode-Linux)
* 合流画面填充模式
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,748 |
QNCameraCapability | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNCameraCapability
# QNCameraCapability
最近更新时间: 2022-03-28 17:56:36
摄像头支持的采集能力
Index
Properties
* width
* height
* max_fps
* video_frame_type
Properties
width
* width: int
* 采集宽
height
* height: int
* 采集高
max_fps
* max_fps: int
* 采集帧率
video_frame_type
* video_frame_type: [QNVideoFrameType](https://developer.qiniu.com/rtc/11258/QNCameraCapability-Linux/11300/QNVideoFrameType-Linux)
* 采集的视频数据格式
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNCameraCapability
# QNCameraCapability
最近更新时间: 2022-03-28 17:56:36
摄像头支持的采集能力
Index
Properties
* width
* height
* max_fps
* video_frame_type
Properties
width
* width: int
* 采集宽
height
* height: int
* 采集高
max_fps
* max_fps: int
* 采集帧率
video_frame_type
* video_frame_type: [QNVideoFrameType](https://developer.qiniu.com/rtc/11258/QNCameraCapability-Linux/11300/QNVideoFrameType-Linux)
* 采集的视频数据格式
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,750 |
QNTrackInfoChangedListener | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNTrackInfoChangedListener
# QNTrackInfoChangedListener
最近更新时间: 2022-03-28 17:58:09
Track 信息改变回调接口
Index
Core Methods
* OnVideoProfileChanged
* OnMuteStateChanged
Core Methods
OnVideoProfileChanged
* virtual void OnVideoProfileChanged(const std::string& user_id,const std::string& track_id,[QNTrackProfile](https://developer.qiniu.com/rtc/11223/QNTrackInfoChangedListener-Linux/11293/QNTrackProfile-Linux) profile) = 0
* 视频 Track profile 改变后触发
Parameters
* user_id: string
切换 pofile 的被订阅用户 ID
* track_id: string
视频 track id
* profile: [QNTrackProfile](https://developer.qiniu.com/rtc/11223/QNTrackInfoChangedListener-Linux/11293/QNTrackProfile-Linux)
当前改变后的 profile
OnMuteStateChanged
* virtual void OnMuteStateChanged(const std::string& user_id,const std::string& track_id,bool muted) = 0
* Track 静默状态改变后触发
Parameters
* user_id: string
是改变静默状态的远端用户 ID
* track_id: string
改变静默状态的远端 track id
* muted: bool
是否为静默状态
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNTrackInfoChangedListener
# QNTrackInfoChangedListener
最近更新时间: 2022-03-28 17:58:09
Track 信息改变回调接口
Index
Core Methods
* OnVideoProfileChanged
* OnMuteStateChanged
Core Methods
OnVideoProfileChanged
* virtual void OnVideoProfileChanged(const std::string& user_id,const std::string& track_id,[QNTrackProfile](https://developer.qiniu.com/rtc/11223/QNTrackInfoChangedListener-Linux/11293/QNTrackProfile-Linux) profile) = 0
* 视频 Track profile 改变后触发
Parameters
* user_id: string
切换 pofile 的被订阅用户 ID
* track_id: string
视频 track id
* profile: [QNTrackProfile](https://developer.qiniu.com/rtc/11223/QNTrackInfoChangedListener-Linux/11293/QNTrackProfile-Linux)
当前改变后的 profile
OnMuteStateChanged
* virtual void OnMuteStateChanged(const std::string& user_id,const std::string& track_id,bool muted) = 0
* Track 静默状态改变后触发
Parameters
* user_id: string
是改变静默状态的远端用户 ID
* track_id: string
改变静默状态的远端 track id
* muted: bool
是否为静默状态
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,751 |
QNCameraInfo | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNCameraInfo
# QNCameraInfo
最近更新时间: 2022-03-28 17:58:45
摄像头设备信息
Index
Properties
* id
* name
* capabilities
Properties
id
* id: string
* 设备 Id,用于系统内做标识
name
* name: string
* 设备名
capabilities
* capabilities: std::vector<[QNCameraCapability](https://developer.qiniu.com/rtc/11260/QNCameraInfo-Linux/11258/QNCameraCapability-Linux)>
* 此摄像头所支持的采集能力列表
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNCameraInfo
# QNCameraInfo
最近更新时间: 2022-03-28 17:58:45
摄像头设备信息
Index
Properties
* id
* name
* capabilities
Properties
id
* id: string
* 设备 Id,用于系统内做标识
name
* name: string
* 设备名
capabilities
* capabilities: std::vector<[QNCameraCapability](https://developer.qiniu.com/rtc/11260/QNCameraInfo-Linux/11258/QNCameraCapability-Linux)>
* 此摄像头所支持的采集能力列表
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,753 |
QNVideoEncoderConfig | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNVideoEncoderConfig
# QNVideoEncoderConfig
最近更新时间: 2022-03-28 17:59:27
编码器类型
Index
Enum
* QNVideoEncoderType
Enum
QNVideoEncoderType
* code | describe | message
---|---|---
kEncodeOpenH264 | 默认 Open264 编码器,支持所有平台 | 无
Type declaration
* kEncodeOpenH264
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNVideoEncoderConfig
# QNVideoEncoderConfig
最近更新时间: 2022-03-28 17:59:27
编码器类型
Index
Enum
* QNVideoEncoderType
Enum
QNVideoEncoderType
* code | describe | message
---|---|---
kEncodeOpenH264 | 默认 Open264 编码器,支持所有平台 | 无
Type declaration
* kEncodeOpenH264
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,754 |
QNDirectLiveStreamingConfig | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNDirectLiveStreamingConfig
# QNDirectLiveStreamingConfig
最近更新时间: 2022-03-28 18:40:10
单路转推配置信息,通过 SDK 将参数发送到服务端,服务端按照指定的参数进行 CDN 转推
Index
Properties
* local_audio_track
* local_video_track
* stream_id
* publish_url
Properties
local_audio_track
* local_audio_track: [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11268/QNDirectLiveStreamingConfig-Linux/11207/QNLocalAudioTrack-Linux)*
* 单路转推的音频 track
local_video_track
* local_video_track: [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11268/QNDirectLiveStreamingConfig-Linux/11209/QNLocalVideoTrack-Linux)*
* 单路转推的视频 track
stream_id
* stream_id: string
* 单路转推任务 id,由客户端设置,不可为空
publish_url
* publish_url: string
* rtmp 转推地址
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNDirectLiveStreamingConfig
# QNDirectLiveStreamingConfig
最近更新时间: 2022-03-28 18:40:10
单路转推配置信息,通过 SDK 将参数发送到服务端,服务端按照指定的参数进行 CDN 转推
Index
Properties
* local_audio_track
* local_video_track
* stream_id
* publish_url
Properties
local_audio_track
* local_audio_track: [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11268/QNDirectLiveStreamingConfig-Linux/11207/QNLocalAudioTrack-Linux)*
* 单路转推的音频 track
local_video_track
* local_video_track: [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11268/QNDirectLiveStreamingConfig-Linux/11209/QNLocalVideoTrack-Linux)*
* 单路转推的视频 track
stream_id
* stream_id: string
* 单路转推任务 id,由客户端设置,不可为空
publish_url
* publish_url: string
* rtmp 转推地址
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,755 |
QNVideoFrameType | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNVideoFrameType
# QNVideoFrameType
最近更新时间: 2022-05-24 22:11:40
视频数据格式
Index
Enum
* QNVideoFrameType
Enum
QNVideoFrameType
* Type declaration
* kUnknown
* kI420
* kIYUV
* kRGB24
* kABGR
* kARGB
* kARGB4444
* kRGB565
* kARGB1555
* kYUY2
* kYV12
* kUYVY
* kMJPEG
* kNV21
* kNV12
* kBGRA
* kH264Raw
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNVideoFrameType
# QNVideoFrameType
最近更新时间: 2022-05-24 22:11:40
视频数据格式
Index
Enum
* QNVideoFrameType
Enum
QNVideoFrameType
* Type declaration
* kUnknown
* kI420
* kIYUV
* kRGB24
* kABGR
* kARGB
* kARGB4444
* kRGB565
* kARGB1555
* kYUY2
* kYV12
* kUYVY
* kMJPEG
* kNV21
* kNV12
* kBGRA
* kH264Raw
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,757 |
QNTranscodingLiveStreamingTrack | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNTranscodingLiveStreamingTrack
# QNTranscodingLiveStreamingTrack
最近更新时间: 2022-03-28 22:31:39
旁路直播合流配置信息,通过 SDK 将参数发送到服务端,服务端按照指定的参数进行合流并推出 RTMP 流
Index
Properties
* track_id
* x
* y
* z
* width
* height
* stretch_mode
* is_support_sei
Properties
track_id
* track_id: string
* track id,房间内唯一
x
* x: int32_t
* 此路视频流(即此 video track)在 RTMP 流画布中的 X 坐标
y
* y: int32_t
* 此路视频流(即此 video track)在 RTMP 流画布中的 y 坐标
z
* z: int32_t
* 此路视频流(即此 video track)在 RTMP 流画布中的 z 坐标
width
* width: int32_t
* 此路视频流(即此 video track) RTMP 流画布中的宽度,缩放、裁减方式根据后端配置决定
height
* height: int32_t
* 此路视频流(即此 video track) RTMP 流画布中的高度,缩放、裁减方式根据后端配置决定
stretch_mode
* stretch_mode: [QNStretchMode](https://developer.qiniu.com/rtc/11296/QNTranscodingLiveStreamingTrack-Linux/11292/QNStretchMode-Linux)
* 设置video track 在合流时的填充模式,如果不做单独设置,填充模式将继承 StartLiveStreaming 的 stretchMode
is_support_sei
* is_support_sei: bool
* 是否支持私有 SEI 数据插入,只支持一路 video track 设置
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNTranscodingLiveStreamingTrack
# QNTranscodingLiveStreamingTrack
最近更新时间: 2022-03-28 22:31:39
旁路直播合流配置信息,通过 SDK 将参数发送到服务端,服务端按照指定的参数进行合流并推出 RTMP 流
Index
Properties
* track_id
* x
* y
* z
* width
* height
* stretch_mode
* is_support_sei
Properties
track_id
* track_id: string
* track id,房间内唯一
x
* x: int32_t
* 此路视频流(即此 video track)在 RTMP 流画布中的 X 坐标
y
* y: int32_t
* 此路视频流(即此 video track)在 RTMP 流画布中的 y 坐标
z
* z: int32_t
* 此路视频流(即此 video track)在 RTMP 流画布中的 z 坐标
width
* width: int32_t
* 此路视频流(即此 video track) RTMP 流画布中的宽度,缩放、裁减方式根据后端配置决定
height
* height: int32_t
* 此路视频流(即此 video track) RTMP 流画布中的高度,缩放、裁减方式根据后端配置决定
stretch_mode
* stretch_mode: [QNStretchMode](https://developer.qiniu.com/rtc/11296/QNTranscodingLiveStreamingTrack-Linux/11292/QNStretchMode-Linux)
* 设置video track 在合流时的填充模式,如果不做单独设置,填充模式将继承 StartLiveStreaming 的 stretchMode
is_support_sei
* is_support_sei: bool
* 是否支持私有 SEI 数据插入,只支持一路 video track 设置
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,758 |
QNVideoCaptureConfig | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNVideoCaptureConfig
# QNVideoCaptureConfig
最近更新时间: 2022-03-21 21:28:15
配置视频采集参数的结构体
Index
Properties
* width
* height
* frame_rate
Properties
width
* width: int32_t
* 设置视频采集宽度
height
* height: int32_t
* 设置视频采集高度
frame_rate
* frame_rate: int32_t
* 是视频采集帧率
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNVideoCaptureConfig
# QNVideoCaptureConfig
最近更新时间: 2022-03-21 21:28:15
配置视频采集参数的结构体
Index
Properties
* width
* height
* frame_rate
Properties
width
* width: int32_t
* 设置视频采集宽度
height
* height: int32_t
* 设置视频采集高度
frame_rate
* frame_rate: int32_t
* 是视频采集帧率
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,760 |
QNCustomAudioTrackConfig | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNCustomAudioTrackConfig
# QNCustomAudioTrackConfig
最近更新时间: 2022-03-28 22:34:05
自定义音频采集 Track 的配置
Index
Properties
* audio_quality
* tag
Properties
audio_quality
* audio_quality: [QNAudioQuality](https://developer.qiniu.com/rtc/11204/QNCustomAudioTrackConfig-Linux/11190/QNAudioQuality-Linux)
* 设置音频质量
tag
* tag: string
* 自定义标签
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNCustomAudioTrackConfig
# QNCustomAudioTrackConfig
最近更新时间: 2022-03-28 22:34:05
自定义音频采集 Track 的配置
Index
Properties
* audio_quality
* tag
Properties
audio_quality
* audio_quality: [QNAudioQuality](https://developer.qiniu.com/rtc/11204/QNCustomAudioTrackConfig-Linux/11190/QNAudioQuality-Linux)
* 设置音频质量
tag
* tag: string
* 自定义标签
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,761 |
QNLocalAudioTrackStats | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNLocalAudioTrackStats
# QNLocalAudioTrackStats
最近更新时间: 2022-03-23 13:58:30
本地发布的音频统计信息
Index
Properties
* uplink_bitrate
* uplink_rtt
* uplink_lostrate
Properties
uplink_bitrate
* uplink_bitrate: int32_t
* 上行音频码率
uplink_rtt
* uplink_rtt: int32_t
* 上行网络 rtt
uplink_lostrate
* uplink_lostrate: int32_t
* 上行网络丢包率
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNLocalAudioTrackStats
# QNLocalAudioTrackStats
最近更新时间: 2022-03-23 13:58:30
本地发布的音频统计信息
Index
Properties
* uplink_bitrate
* uplink_rtt
* uplink_lostrate
Properties
uplink_bitrate
* uplink_bitrate: int32_t
* 上行音频码率
uplink_rtt
* uplink_rtt: int32_t
* 上行网络 rtt
uplink_lostrate
* uplink_lostrate: int32_t
* 上行网络丢包率
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,762 |
QNImageType | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNImageType
# QNImageType
最近更新时间: 2022-03-23 13:55:41
图片类型
Index
Enum
* QNImageType
Enum
QNImageType
* Type declaration
* kImagJpeg
* kImagPng
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNImageType
# QNImageType
最近更新时间: 2022-03-23 13:55:41
图片类型
Index
Enum
* QNImageType
Enum
QNImageType
* Type declaration
* kImagJpeg
* kImagPng
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,763 |
QNRemoteVideoTrackStats | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNRemoteVideoTrackStats
# QNRemoteVideoTrackStats
最近更新时间: 2022-03-28 22:37:49
订阅远端的视频统计信息
Index
Properties
* profile
* downlink_framerate
* downlink_bitrate
* downlink_lostrate
* uplink_rtt
* uplink_lostrate
Properties
profile
* profile: [QNTrackProfile](https://developer.qiniu.com/rtc/11286/QNRemoteVideoTrackStats-Linux/11293/QNTrackProfile-Linux)
* 该路 track 的 profile
downlink_framerate
* downlink_framerate: int32_t
* 下行视频帧率
downlink_bitrate
* downlink_bitrate: int32_t
* 下行视频码率
downlink_lostrate
* downlink_lostrate: int32_t
* 下行网络丢包率
uplink_rtt
* uplink_rtt: int32_t
* 上行网络 rtt (即远端用户发布视频的网络链路的 rtt)
uplink_lostrate
* uplink_lostrate: int32_t
* 上行网络丢包率
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNRemoteVideoTrackStats
# QNRemoteVideoTrackStats
最近更新时间: 2022-03-28 22:37:49
订阅远端的视频统计信息
Index
Properties
* profile
* downlink_framerate
* downlink_bitrate
* downlink_lostrate
* uplink_rtt
* uplink_lostrate
Properties
profile
* profile: [QNTrackProfile](https://developer.qiniu.com/rtc/11286/QNRemoteVideoTrackStats-Linux/11293/QNTrackProfile-Linux)
* 该路 track 的 profile
downlink_framerate
* downlink_framerate: int32_t
* 下行视频帧率
downlink_bitrate
* downlink_bitrate: int32_t
* 下行视频码率
downlink_lostrate
* downlink_lostrate: int32_t
* 下行网络丢包率
uplink_rtt
* uplink_rtt: int32_t
* 上行网络 rtt (即远端用户发布视频的网络链路的 rtt)
uplink_lostrate
* uplink_lostrate: int32_t
* 上行网络丢包率
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,764 |
QNVideoRotation | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNVideoRotation
# QNVideoRotation
最近更新时间: 2022-03-23 14:25:46
视频数据的旋转角度,主要用于对原始视频数据进行处理的功能接口中
Index
Enum
* QNVideoRotation
Enum
QNVideoRotation
* code | describe | message
---|---|---
kVideoRotation0 | 旋转 0 度 | 无
kVideoRotation90 | 旋转 90 度 | 无
kVideoRotation180 | 旋转 180 度 | 无
kVideoRotation270 | 旋转 270 度 | 无
Type declaration
* kVideoRotation0
* kVideoRotation90
* kVideoRotation180
* kVideoRotation270
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNVideoRotation
# QNVideoRotation
最近更新时间: 2022-03-23 14:25:46
视频数据的旋转角度,主要用于对原始视频数据进行处理的功能接口中
Index
Enum
* QNVideoRotation
Enum
QNVideoRotation
* code | describe | message
---|---|---
kVideoRotation0 | 旋转 0 度 | 无
kVideoRotation90 | 旋转 90 度 | 无
kVideoRotation180 | 旋转 180 度 | 无
kVideoRotation270 | 旋转 270 度 | 无
Type declaration
* kVideoRotation0
* kVideoRotation90
* kVideoRotation180
* kVideoRotation270
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,766 |
QNConnectionState | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNConnectionState
# QNConnectionState
最近更新时间: 2022-03-28 22:39:59
连麦房间连接状态
Index
Properties
* kDisconnected
* kConnecting
* kConnected
* kReconnecting
* kReconnected
Properties
kDisconnected
* kDisconnected: QNConnectionState
* 未链接状态
SDK 出现无法恢复错误时也进入该状态
kConnecting
* kConnecting: QNConnectionState
* 正在连接状态
当调用
[QNRTCClient.Join](https://developer.qiniu.com/rtc/11266/QNConnectionState-
Linux/11288) 后, 首先进入该状态,表示开始连接房间服务
kConnected
* kConnected: QNConnectionState
* 连接成功状态
当调用
[QNRTCClient.Join](https://developer.qiniu.com/rtc/11266/QNConnectionState-
Linux/11288),在完成和房间服务连接后进入该状态
kReconnecting
* kReconnecting: QNConnectionState
* 正在重连状态
当和房间的已有连接由于网络中断、网络异常等原因断开,SDK 进行周期性重连时进入该状态
kReconnected
* kReconnected: QNConnectionState
* 重连成功状态
当从 kReconnecting 状态,重新和房间服务建立连接后进入该状态
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNConnectionState
# QNConnectionState
最近更新时间: 2022-03-28 22:39:59
连麦房间连接状态
Index
Properties
* kDisconnected
* kConnecting
* kConnected
* kReconnecting
* kReconnected
Properties
kDisconnected
* kDisconnected: QNConnectionState
* 未链接状态
SDK 出现无法恢复错误时也进入该状态
kConnecting
* kConnecting: QNConnectionState
* 正在连接状态
当调用
[QNRTCClient.Join](https://developer.qiniu.com/rtc/11266/QNConnectionState-
Linux/11288) 后, 首先进入该状态,表示开始连接房间服务
kConnected
* kConnected: QNConnectionState
* 连接成功状态
当调用
[QNRTCClient.Join](https://developer.qiniu.com/rtc/11266/QNConnectionState-
Linux/11288),在完成和房间服务连接后进入该状态
kReconnecting
* kReconnecting: QNConnectionState
* 正在重连状态
当和房间的已有连接由于网络中断、网络异常等原因断开,SDK 进行周期性重连时进入该状态
kReconnected
* kReconnected: QNConnectionState
* 重连成功状态
当从 kReconnecting 状态,重新和房间服务建立连接后进入该状态
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,767 |
QNClientEventListener | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNClientEventListener
# QNClientEventListener
最近更新时间: 2022-03-28 22:44:09
[QNRTCClient](https://developer.qiniu.com/rtc/11261/QNClientEventListener-
Linux/11288/QNRTCClient-Linux) 事件回调接口
Index
Core Methods
* OnConnectionStateChanged
* OnUserJoined
* OnUserLeft
* OnUserReconnecting
* OnUserReconnected
* OnUserPublished
* OnUserUnpublished
* OnSubscribed
* OnMessageReceived
* OnMediaRelayStateChanged
Core Methods
OnConnectionStateChanged
* virtual void OnConnectionStateChanged(QNConnectionState state, const QNConnectionDisconnectedInfo* info) = 0
* 房间连接状态变化时通知
Parameters
* state: [QNConnectionState](https://developer.qiniu.com/rtc/11261/QNClientEventListener-Linux/11266/QNConnectionState-Linux)
连接状态
* info: [QNConnectionDisconnectedInfo](https://developer.qiniu.com/rtc/11261/QNClientEventListener-Linux/11265/QNConnectionDisconnectedInfo-Linux)
断开连接时状态信息
OnUserJoined
* virtual void OnUserJoined(const std::string& remote_user_id, const std::string& user_data) = 0
* 远端用户加入房间时通知
Parameters
* remote_user_id: string
远端用户 id
* user_data: string
远端用户自定义消息
OnUserLeft
* virtual void OnUserLeft(const std::string& remote_user_id) = 0
* 远端用户离开房间时通知
Parameters
* remote_user_id: string
远端用户 id
OnUserReconnecting
* virtual void OnUserReconnecting(const std::string& remote_user_id) = 0
* 远端用户重连时通知
Parameters
* remote_user_id: string
远端用户 id
OnUserReconnected
* virtual void OnUserReconnected(const std::string& remote_user_id) = 0
* 远端用户重连成功时通知
Parameters
* remote_user_id: string
远端用户 id
OnUserPublished
* virtual void OnUserPublished(const std::string& remote_user_id, const RemoteTrackList& track_list) = 0
* 远端用户发布新 track 时通知
Parameters
* remote_user_id: string
远端用户 id
* track_list: std::list<shared_ptr<[QNRemoteTrack](https://developer.qiniu.com/rtc/11261/QNClientEventListener-Linux/11213/QNRemoteTrack-Linux)>>
远端用户新发布的 tracks
OnUserUnpublished
* virtual void OnUserUnpublished(const std::string& remote_user_id, const RemoteTrackList& track_list) = 0
* 远端用户取消发布 track 时通知
Parameters
* remote_user_id: string
远端用户 id
* track_list: std::list<shared_ptr<[QNRemoteTrack](https://developer.qiniu.com/rtc/11261/QNClientEventListener-Linux/11213/QNRemoteTrack-Linux)>>
远端用户取消发布的 tracks
OnSubscribed
* virtual void OnSubscribed(const std::string& remote_user_id,const RemoteAudioTrackList& remote_audio_track_list,const RemoteVideoTrackList& remote_video_track_list) = 0
* 订阅 track 成功时通知
Parameters
* remote_user_id: string
订阅的 track 所属的远端用户
* remote_audio_track_list: std::list<shared_ptr<[QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11261/QNClientEventListener-Linux/11212/QNRemoteAudioTrack-Linux)>>
订阅的音频 tracks
* remote_video_track_list: std::list<shared_ptr<[QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11261/QNClientEventListener-Linux/11215/QNRemoteVideoTrack-Linux)>>
订阅的视频 tracks
OnMessageReceived
* virtual void OnMessageReceived(const CustomMessageList& message) = 0
* 接收收到新的自定义消息时通知
Parameters
* message: std::list<[QNCustomMessage](https://developer.qiniu.com/rtc/11261/QNClientEventListener-Linux/11267/QNCustomMessage-Linux)>
自定义消息列表
OnMediaRelayStateChanged
* virtual void OnMediaRelayStateChanged(const std::string& relay_room, const QNMediaRelayState state) = 0
* 跨发媒体转发状态变更,非主动调用触发,由目标房间状态变化引起此通知
目前仅当目标房间关闭时,会触发此通知
Parameters
* relay_room: string
发生状态变化的房间名
* state: [QNMediaRelayState](https://developer.qiniu.com/rtc/11261/QNClientEventListener-Linux/undefined)
新状态,当前仅可能为 QNMediaRelayState::kRoomClosed
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNClientEventListener
# QNClientEventListener
最近更新时间: 2022-03-28 22:44:09
[QNRTCClient](https://developer.qiniu.com/rtc/11261/QNClientEventListener-
Linux/11288/QNRTCClient-Linux) 事件回调接口
Index
Core Methods
* OnConnectionStateChanged
* OnUserJoined
* OnUserLeft
* OnUserReconnecting
* OnUserReconnected
* OnUserPublished
* OnUserUnpublished
* OnSubscribed
* OnMessageReceived
* OnMediaRelayStateChanged
Core Methods
OnConnectionStateChanged
* virtual void OnConnectionStateChanged(QNConnectionState state, const QNConnectionDisconnectedInfo* info) = 0
* 房间连接状态变化时通知
Parameters
* state: [QNConnectionState](https://developer.qiniu.com/rtc/11261/QNClientEventListener-Linux/11266/QNConnectionState-Linux)
连接状态
* info: [QNConnectionDisconnectedInfo](https://developer.qiniu.com/rtc/11261/QNClientEventListener-Linux/11265/QNConnectionDisconnectedInfo-Linux)
断开连接时状态信息
OnUserJoined
* virtual void OnUserJoined(const std::string& remote_user_id, const std::string& user_data) = 0
* 远端用户加入房间时通知
Parameters
* remote_user_id: string
远端用户 id
* user_data: string
远端用户自定义消息
OnUserLeft
* virtual void OnUserLeft(const std::string& remote_user_id) = 0
* 远端用户离开房间时通知
Parameters
* remote_user_id: string
远端用户 id
OnUserReconnecting
* virtual void OnUserReconnecting(const std::string& remote_user_id) = 0
* 远端用户重连时通知
Parameters
* remote_user_id: string
远端用户 id
OnUserReconnected
* virtual void OnUserReconnected(const std::string& remote_user_id) = 0
* 远端用户重连成功时通知
Parameters
* remote_user_id: string
远端用户 id
OnUserPublished
* virtual void OnUserPublished(const std::string& remote_user_id, const RemoteTrackList& track_list) = 0
* 远端用户发布新 track 时通知
Parameters
* remote_user_id: string
远端用户 id
* track_list: std::list<shared_ptr<[QNRemoteTrack](https://developer.qiniu.com/rtc/11261/QNClientEventListener-Linux/11213/QNRemoteTrack-Linux)>>
远端用户新发布的 tracks
OnUserUnpublished
* virtual void OnUserUnpublished(const std::string& remote_user_id, const RemoteTrackList& track_list) = 0
* 远端用户取消发布 track 时通知
Parameters
* remote_user_id: string
远端用户 id
* track_list: std::list<shared_ptr<[QNRemoteTrack](https://developer.qiniu.com/rtc/11261/QNClientEventListener-Linux/11213/QNRemoteTrack-Linux)>>
远端用户取消发布的 tracks
OnSubscribed
* virtual void OnSubscribed(const std::string& remote_user_id,const RemoteAudioTrackList& remote_audio_track_list,const RemoteVideoTrackList& remote_video_track_list) = 0
* 订阅 track 成功时通知
Parameters
* remote_user_id: string
订阅的 track 所属的远端用户
* remote_audio_track_list: std::list<shared_ptr<[QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11261/QNClientEventListener-Linux/11212/QNRemoteAudioTrack-Linux)>>
订阅的音频 tracks
* remote_video_track_list: std::list<shared_ptr<[QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11261/QNClientEventListener-Linux/11215/QNRemoteVideoTrack-Linux)>>
订阅的视频 tracks
OnMessageReceived
* virtual void OnMessageReceived(const CustomMessageList& message) = 0
* 接收收到新的自定义消息时通知
Parameters
* message: std::list<[QNCustomMessage](https://developer.qiniu.com/rtc/11261/QNClientEventListener-Linux/11267/QNCustomMessage-Linux)>
自定义消息列表
OnMediaRelayStateChanged
* virtual void OnMediaRelayStateChanged(const std::string& relay_room, const QNMediaRelayState state) = 0
* 跨发媒体转发状态变更,非主动调用触发,由目标房间状态变化引起此通知
目前仅当目标房间关闭时,会触发此通知
Parameters
* relay_room: string
发生状态变化的房间名
* state: [QNMediaRelayState](https://developer.qiniu.com/rtc/11261/QNClientEventListener-Linux/undefined)
新状态,当前仅可能为 QNMediaRelayState::kRoomClosed
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,769 |
QNVideoEncoderType | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNVideoEncoderType
# QNVideoEncoderType
最近更新时间: 2022-05-24 22:10:23
编码器类型
Index
Enum
* QNVideoEncoderType
Enum
QNVideoEncoderType
* code | describe | message
---|---|---
kEncodeOpenH264 | 默认 Open264 编码器,支持所有平台 | 无
kExternal | H264 用于数据透传 | 无
Type declaration
* kEncodeOpenH264
* kExternal
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNVideoEncoderType
# QNVideoEncoderType
最近更新时间: 2022-05-24 22:10:23
编码器类型
Index
Enum
* QNVideoEncoderType
Enum
QNVideoEncoderType
* code | describe | message
---|---|---
kEncodeOpenH264 | 默认 Open264 编码器,支持所有平台 | 无
kExternal | H264 用于数据透传 | 无
Type declaration
* kEncodeOpenH264
* kExternal
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,774 |
QNAudioDeviceInfo | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNAudioDeviceInfo
# QNAudioDeviceInfo
最近更新时间: 2022-03-23 21:10:38
音频设备信息
Index
Properties
* id
* name
* is_default
Properties
id
* id: string
* 设备 ID
name
* name: string
* 设备名
is_default
* is_default: bool
* 是否是系统默认设备
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNAudioDeviceInfo
# QNAudioDeviceInfo
最近更新时间: 2022-03-23 21:10:38
音频设备信息
Index
Properties
* id
* name
* is_default
Properties
id
* id: string
* 设备 ID
name
* name: string
* 设备名
is_default
* is_default: bool
* 是否是系统默认设备
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,775 |
QNCustomMessage | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNCustomMessage
# QNCustomMessage
最近更新时间: 2022-03-23 13:52:53
自定义消息
Index
Properties
* msg_id
* msg_sendid
* msg_text
* msg_stamp
Properties
msg_id
* msg_id: string
* 消息唯一 id
msg_sendid
* msg_sendid: string
* 消息发送者的 user id
msg_text
* msg_text: string
* 消息内容
msg_stamp
* msg_stamp: int32_t
* 消息时间戳
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNCustomMessage
# QNCustomMessage
最近更新时间: 2022-03-23 13:52:53
自定义消息
Index
Properties
* msg_id
* msg_sendid
* msg_text
* msg_stamp
Properties
msg_id
* msg_id: string
* 消息唯一 id
msg_sendid
* msg_sendid: string
* 消息发送者的 user id
msg_text
* msg_text: string
* 消息内容
msg_stamp
* msg_stamp: int32_t
* 消息时间戳
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,776 |
QNVideoFrameListener | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNVideoFrameListener
# QNVideoFrameListener
最近更新时间: 2022-03-28 22:45:43
视频数据回调接口
Index
Core Methods
* OnVideoFrame
Core Methods
OnVideoFrame
* virtual void OnVideoFrame(const std::string& user_id,const string& track_id,const uint8_t* data,uint32_t data_size,int32_t width,int32_t height,QNVideoFrameType video_frame_type) = 0
* 音频数据回调
Parameters
* user_id: string
此视频数据所属的用户
* track_id: string
此音频 track id
* data: uint8_t*
视频数据内存指针
* data_size: uint32_t
数据长度
* width: int32_t
视频宽
* height: int32_t
视频高
* video_frame_type: [QNVideoFrameType](https://developer.qiniu.com/rtc/11226/QNVideoFrameListener-Linux/11300/QNVideoFrameType-Linux)
视频数据类型
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNVideoFrameListener
# QNVideoFrameListener
最近更新时间: 2022-03-28 22:45:43
视频数据回调接口
Index
Core Methods
* OnVideoFrame
Core Methods
OnVideoFrame
* virtual void OnVideoFrame(const std::string& user_id,const string& track_id,const uint8_t* data,uint32_t data_size,int32_t width,int32_t height,QNVideoFrameType video_frame_type) = 0
* 音频数据回调
Parameters
* user_id: string
此视频数据所属的用户
* track_id: string
此音频 track id
* data: uint8_t*
视频数据内存指针
* data_size: uint32_t
数据长度
* width: int32_t
视频宽
* height: int32_t
视频高
* video_frame_type: [QNVideoFrameType](https://developer.qiniu.com/rtc/11226/QNVideoFrameListener-Linux/11300/QNVideoFrameType-Linux)
视频数据类型
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,777 |
QNAudioDeviceState | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNAudioDeviceState
# QNAudioDeviceState
最近更新时间: 2022-03-23 13:38:43
音频设备当前状态,用与设备插拔的检测和通知
Index
Enum
* QNAudioDeviceState
Enum
QNAudioDeviceState
* code | describe | message
---|---|---
kAudioDeviceActive | 新的可用设备 | 无
kAudioDeviceDisabled | 设备失效 | 无
kAudioDeviceNotPresent | 设备不存在 | 无
kAudioDeviceLost | 设备被拔出 | 无
Type declaration
* kAudioDeviceActive
* kAudioDeviceDisabled
* kAudioDeviceNotPresent
* kAudioDeviceLost
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNAudioDeviceState
# QNAudioDeviceState
最近更新时间: 2022-03-23 13:38:43
音频设备当前状态,用与设备插拔的检测和通知
Index
Enum
* QNAudioDeviceState
Enum
QNAudioDeviceState
* code | describe | message
---|---|---
kAudioDeviceActive | 新的可用设备 | 无
kAudioDeviceDisabled | 设备失效 | 无
kAudioDeviceNotPresent | 设备不存在 | 无
kAudioDeviceLost | 设备被拔出 | 无
Type declaration
* kAudioDeviceActive
* kAudioDeviceDisabled
* kAudioDeviceNotPresent
* kAudioDeviceLost
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,778 |
QNAudioQuality | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNAudioQuality
# QNAudioQuality
最近更新时间: 2022-03-21 20:54:02
描述音频质量的配置属性
Index
Properties
* sample_rate
* channel_count
* bits_per_sample
* bitrate
Properties
sample_rate
* sample_rate: int32_t
* 采样率,出于对 Android 设备兼容性的考虑,语音通话场景下建议使用 16kHz 的采样率,否则在某些特殊设备上可能会出现回声等问题
channel_count
* channel_count: int32_t
* 声道数
bits_per_sample
* bits_per_sample: int32_t
* 位宽
bitrate
* bitrate: int32_t
* 编码码率,单位 kbps
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNAudioQuality
# QNAudioQuality
最近更新时间: 2022-03-21 20:54:02
描述音频质量的配置属性
Index
Properties
* sample_rate
* channel_count
* bits_per_sample
* bitrate
Properties
sample_rate
* sample_rate: int32_t
* 采样率,出于对 Android 设备兼容性的考虑,语音通话场景下建议使用 16kHz 的采样率,否则在某些特殊设备上可能会出现回声等问题
channel_count
* channel_count: int32_t
* 声道数
bits_per_sample
* bits_per_sample: int32_t
* 位宽
bitrate
* bitrate: int32_t
* 编码码率,单位 kbps
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,780 |
QNClientRoleListener | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNClientRoleListener
# QNClientRoleListener
最近更新时间: 2022-03-28 22:47:08
角色设置回调接口,可通过调用
[QNRTCClient.SetClientRole](https://developer.qiniu.com/rtc/11264/QNClientRoleListener-
Linux/11288) 传入
Index
Core Methods
* OnClientRoleResult
* OnClientRoleError
Core Methods
OnClientRoleResult
* virtual void OnClientRoleResult(QNClientRole new_role) = 0
* 设置角色成功回调
Parameters
* new_role: [QNClientRole](https://developer.qiniu.com/rtc/11264/QNClientRoleListener-Linux/11263/QNClientRole-Linux)
新角色类型
OnClientRoleError
* virtual void OnClientRoleError(int error_code, const std::string& error_message) = 0
* 设置角色失败回调
code | describe | message
---|---|---
Err_Invalid_Client_Mode | 使用场景不符 | 请确认当前场景为互动直播,通信场景不支持角色设置
Parameters
* errorCode: int
错误码
* error_message: string
错误描述
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNClientRoleListener
# QNClientRoleListener
最近更新时间: 2022-03-28 22:47:08
角色设置回调接口,可通过调用
[QNRTCClient.SetClientRole](https://developer.qiniu.com/rtc/11264/QNClientRoleListener-
Linux/11288) 传入
Index
Core Methods
* OnClientRoleResult
* OnClientRoleError
Core Methods
OnClientRoleResult
* virtual void OnClientRoleResult(QNClientRole new_role) = 0
* 设置角色成功回调
Parameters
* new_role: [QNClientRole](https://developer.qiniu.com/rtc/11264/QNClientRoleListener-Linux/11263/QNClientRole-Linux)
新角色类型
OnClientRoleError
* virtual void OnClientRoleError(int error_code, const std::string& error_message) = 0
* 设置角色失败回调
code | describe | message
---|---|---
Err_Invalid_Client_Mode | 使用场景不符 | 请确认当前场景为互动直播,通信场景不支持角色设置
Parameters
* errorCode: int
错误码
* error_message: string
错误描述
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,781 |
QNLocalVideoTrackStats | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNLocalVideoTrackStats
# QNLocalVideoTrackStats
最近更新时间: 2022-03-28 22:48:40
本地发布的视频统计信息
Index
Properties
* profile
* uplink_framerate
* uplink_bitrate
* uplink_rtt
* uplink_lostrate
Properties
profile
* profile: [QNTrackProfile](https://developer.qiniu.com/rtc/11274/QNLocalVideoTrackStats-Linux/11293/QNTrackProfile-Linux)
* 该路 track 的 profile
uplink_framerate
* uplink_framerate: int32_t
* 上行视频帧率
uplink_bitrate
* uplink_bitrate: int32_t
* 上行视频码率
uplink_rtt
* uplink_rtt: int32_t
* 上行网络 rtt
uplink_lostrate
* uplink_lostrate: int32_t
* 上行网络丢包率
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNLocalVideoTrackStats
# QNLocalVideoTrackStats
最近更新时间: 2022-03-28 22:48:40
本地发布的视频统计信息
Index
Properties
* profile
* uplink_framerate
* uplink_bitrate
* uplink_rtt
* uplink_lostrate
Properties
profile
* profile: [QNTrackProfile](https://developer.qiniu.com/rtc/11274/QNLocalVideoTrackStats-Linux/11293/QNTrackProfile-Linux)
* 该路 track 的 profile
uplink_framerate
* uplink_framerate: int32_t
* 上行视频帧率
uplink_bitrate
* uplink_bitrate: int32_t
* 上行视频码率
uplink_rtt
* uplink_rtt: int32_t
* 上行网络 rtt
uplink_lostrate
* uplink_lostrate: int32_t
* 上行网络丢包率
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,783 |
QNMediaRelayState | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNMediaRelayState
# QNMediaRelayState
最近更新时间: 2022-03-23 14:04:27
跨房媒体转发状态
Index
Properties
* kRelayUnknown
* kRelaySuccess
* kRelayStopped
* kInvalidToken
* kRelayNoRoom
* kRelayRoomClosed
* kRelayPlayerExisted
Properties
kRelayUnknown
* kRelayUnknown: QNMediaRelayState
* 状态未知
kRelaySuccess
* kRelaySuccess: QNMediaRelayState
* 成功
kRelayStopped
* kRelayStopped: QNMediaRelayState
* 失败
kInvalidToken
* kInvalidToken: QNMediaRelayState
* Token 失效
kRelayNoRoom
* kRelayNoRoom: QNMediaRelayState
* 目标房间不存在
kRelayRoomClosed
* kRelayRoomClosed: QNMediaRelayState
* 目标房间已关闭
kRelayPlayerExisted
* kRelayPlayerExisted: QNMediaRelayState
* 目标房间存在相同用户名
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNMediaRelayState
# QNMediaRelayState
最近更新时间: 2022-03-23 14:04:27
跨房媒体转发状态
Index
Properties
* kRelayUnknown
* kRelaySuccess
* kRelayStopped
* kInvalidToken
* kRelayNoRoom
* kRelayRoomClosed
* kRelayPlayerExisted
Properties
kRelayUnknown
* kRelayUnknown: QNMediaRelayState
* 状态未知
kRelaySuccess
* kRelaySuccess: QNMediaRelayState
* 成功
kRelayStopped
* kRelayStopped: QNMediaRelayState
* 失败
kInvalidToken
* kInvalidToken: QNMediaRelayState
* Token 失效
kRelayNoRoom
* kRelayNoRoom: QNMediaRelayState
* 目标房间不存在
kRelayRoomClosed
* kRelayRoomClosed: QNMediaRelayState
* 目标房间已关闭
kRelayPlayerExisted
* kRelayPlayerExisted: QNMediaRelayState
* 目标房间存在相同用户名
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,785 |
QNRemoteAudioMixedFrameListener | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNRemoteAudioMixedFrameListener
# QNRemoteAudioMixedFrameListener
最近更新时间: 2022-03-23 14:08:51
远端各用户音频数据混音后的回调接口
Index
Core Methods
* OnRemoteAudioMixedFrame
Core Methods
OnRemoteAudioMixedFrame
* virtual void OnRemoteAudioMixedFrame(const uint8_t* data, uint32_t data_size, uint32_t bits_per_sample, uint32_t sample_rate, uint32_t channels) = 0
* 远端各用户音频数据混音后的回调
Parameters
* data: const uint8_t*
音频数据内存指针
* bits_per_sample: uint32_t
位宽,即每个采样点占用位数
* sample_rate: uint32_t
采样率
* channels: uint32_t
声道数
* data_size: uint32_t
音频数据大小
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNRemoteAudioMixedFrameListener
# QNRemoteAudioMixedFrameListener
最近更新时间: 2022-03-23 14:08:51
远端各用户音频数据混音后的回调接口
Index
Core Methods
* OnRemoteAudioMixedFrame
Core Methods
OnRemoteAudioMixedFrame
* virtual void OnRemoteAudioMixedFrame(const uint8_t* data, uint32_t data_size, uint32_t bits_per_sample, uint32_t sample_rate, uint32_t channels) = 0
* 远端各用户音频数据混音后的回调
Parameters
* data: const uint8_t*
音频数据内存指针
* bits_per_sample: uint32_t
位宽,即每个采样点占用位数
* sample_rate: uint32_t
采样率
* channels: uint32_t
声道数
* data_size: uint32_t
音频数据大小
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,787 |
QNLiveStreamingListener | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNLiveStreamingListener
# QNLiveStreamingListener
最近更新时间: 2022-03-28 22:53:37
CDN 转推结果通知接口
Index
Core Methods
* OnStarted
* OnStopped
* OnTranscodingTracksUpdated
* OnLiveStreamingError
Core Methods
OnStarted
* virtual void OnStarted(const std::string& stream_id) = 0
* 转推任务成功创建时触发此回调
Parameters
* stream_id: string
开启转推的 stream id
OnStopped
* virtual void OnStopped(const std::string& stream_id) = 0
* 转推任务成功停止时触发此回调
Parameters
* stream_id: string
停止转推的 stream id
OnTranscodingTracksUpdated
* virtual void OnTranscodingTracksUpdated(const std::string& stream_id) = 0
* 转推任务配置更新时触发此回调
Parameters
* stream_id: string
配置更新的 stream id
OnLiveStreamingError
* virtual void OnLiveStreamingError(const std::string& stream_id, const [QNLiveStreamingErrorInfo](https://developer.qiniu.com/rtc/11272/QNLiveStreamingListener-Linux/11271/QNLiveStreamingErrorInfo-Linux)& error_info) = 0
* 转推任务出错时触发此回调
Parameters
* stream_id: string
出现错误的 stream id
* error_info: [QNLiveStreamingErrorInfo](https://developer.qiniu.com/rtc/11272/QNLiveStreamingListener-Linux/11271/QNLiveStreamingErrorInfo-Linux)
详细错误原因
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNLiveStreamingListener
# QNLiveStreamingListener
最近更新时间: 2022-03-28 22:53:37
CDN 转推结果通知接口
Index
Core Methods
* OnStarted
* OnStopped
* OnTranscodingTracksUpdated
* OnLiveStreamingError
Core Methods
OnStarted
* virtual void OnStarted(const std::string& stream_id) = 0
* 转推任务成功创建时触发此回调
Parameters
* stream_id: string
开启转推的 stream id
OnStopped
* virtual void OnStopped(const std::string& stream_id) = 0
* 转推任务成功停止时触发此回调
Parameters
* stream_id: string
停止转推的 stream id
OnTranscodingTracksUpdated
* virtual void OnTranscodingTracksUpdated(const std::string& stream_id) = 0
* 转推任务配置更新时触发此回调
Parameters
* stream_id: string
配置更新的 stream id
OnLiveStreamingError
* virtual void OnLiveStreamingError(const std::string& stream_id, const [QNLiveStreamingErrorInfo](https://developer.qiniu.com/rtc/11272/QNLiveStreamingListener-Linux/11271/QNLiveStreamingErrorInfo-Linux)& error_info) = 0
* 转推任务出错时触发此回调
Parameters
* stream_id: string
出现错误的 stream id
* error_info: [QNLiveStreamingErrorInfo](https://developer.qiniu.com/rtc/11272/QNLiveStreamingListener-Linux/11271/QNLiveStreamingErrorInfo-Linux)
详细错误原因
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,789 |
QNLogLevel | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNLogLevel
# QNLogLevel
最近更新时间: 2022-03-23 14:00:49
日志级别
Index
Enum
* QNLogLevel
Enum
QNLogLevel
* Type declaration
* kLogNone
* kLogVerbose
* kLogInfo
* kLogWarning
* kLogError
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNLogLevel
# QNLogLevel
最近更新时间: 2022-03-23 14:00:49
日志级别
Index
Enum
* QNLogLevel
Enum
QNLogLevel
* Type declaration
* kLogNone
* kLogVerbose
* kLogInfo
* kLogWarning
* kLogError
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,791 |
QNCustomVideoTrack | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNCustomVideoTrack
# QNCustomVideoTrack
最近更新时间: 2022-05-24 22:05:49
本地视频自定义导入 Track 类
Hierarchy
* [QNTrack](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11222/QNTrack-Linux)
* [QNLocalTrack](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11208/QNLocalTrack-Linux)
* [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11209/QNLocalVideoTrack-Linux)
* [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11198/QNCameraVideoTrack-Linux)
* QNCustomVideoTrack
* [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11207/QNLocalAudioTrack-Linux)
* [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11210/QNMicrophoneAudioTrack-Linux)
* [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11203/QNCustomAudioTrack-Linux)
* [QNRemoteTrack](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11213/QNRemoteTrack-Linux)
* [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11215/QNRemoteVideoTrack-Linux)
* [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11212/QNRemoteAudioTrack-Linux)
Index
Core Methods
* GetTrackID
* GetUserID
* GetTag
* IsAudio
* IsVideo
* IsMuted
* SetMuted
* SetVideoFrameListener
* SendSEI
* PushVideoFrame
Core Methods
GetTrackID
* virtual const std::string& GetTrackID() = 0
* 获取 TrackID
Returns string
GetUserID
* virtual const std::string& GetUserID() = 0
* 获取 UserID
Returns string
GetTag
* virtual const std::string& GetTag() = 0
* 获取 Tag
Returns string
IsAudio
* virtual bool IsAudio() = 0
* 是否为音频 track
Returns bool
IsVideo
* virtual bool IsVideo() = 0
* 是否为视频 track
Returns bool
IsMuted
* virtual bool IsMuted() = 0
* 是否 muted
Returns bool
SetMuted
* virtual void SetMuted(bool muted) = 0
* 设置是否静默该 track,静默后,SDK 将会发送静默帧数据
> 对于推 H264 源的 track,不支持 mute 操作
Parameters
* muted: bool
是否静默
SetVideoFrameListener
* virtual void SetVideoFrameListener([QNVideoFrameListener](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11226/QNVideoFrameListener-Linux)* listener) = 0
* 设置视频数据监听
Parameters
* listener: [QNVideoFrameListener](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11226/QNVideoFrameListener-Linux)
视频数据监听接口
SendSEI
* virtual void SendSEI(std::string& message,std::string& uuid,int32_t repeat_count) = 0
* 发送 SEI
Parameters
* message: string
消息内容
* uuid: string
唯一 ID
* repeat_count: int
重复次数, -1 为每一帧都发送
PushVideoFrame
* virtual int PushVideoFrame(const uint8_t* data,const uint32_t data_size,const int32_t width,const int32_t height,const int64_t timestamp_us,QNVideoFrameType video_frame_type,QNVideoRotation rotation,bool mirror = false) = 0
* 推送自定义视频帧
Parameters
* data: uint8_t*
视频数据
* data_size: uint32_t
数据长度
* width: int32_t
视频宽
* height: int32_t
视频高
* int64_t: timestamp_us
时间戳,单位:微妙
* video_frame_type: [QNVideoFrameType](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11300/QNVideoFrameType-Linux)
视频原始格式,支持:kI420 kYUY2 kRGB24
* rotation: [QNVideoRotation](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11301/QNVideoRotation-Linux)
导入后旋转角度,如果不需要旋转则使用默认值 kVideoRotation0 即可
* mirror: bool
是否镜像
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNCustomVideoTrack
# QNCustomVideoTrack
最近更新时间: 2022-05-24 22:05:49
本地视频自定义导入 Track 类
Hierarchy
* [QNTrack](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11222/QNTrack-Linux)
* [QNLocalTrack](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11208/QNLocalTrack-Linux)
* [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11209/QNLocalVideoTrack-Linux)
* [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11198/QNCameraVideoTrack-Linux)
* QNCustomVideoTrack
* [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11207/QNLocalAudioTrack-Linux)
* [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11210/QNMicrophoneAudioTrack-Linux)
* [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11203/QNCustomAudioTrack-Linux)
* [QNRemoteTrack](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11213/QNRemoteTrack-Linux)
* [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11215/QNRemoteVideoTrack-Linux)
* [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11212/QNRemoteAudioTrack-Linux)
Index
Core Methods
* GetTrackID
* GetUserID
* GetTag
* IsAudio
* IsVideo
* IsMuted
* SetMuted
* SetVideoFrameListener
* SendSEI
* PushVideoFrame
Core Methods
GetTrackID
* virtual const std::string& GetTrackID() = 0
* 获取 TrackID
Returns string
GetUserID
* virtual const std::string& GetUserID() = 0
* 获取 UserID
Returns string
GetTag
* virtual const std::string& GetTag() = 0
* 获取 Tag
Returns string
IsAudio
* virtual bool IsAudio() = 0
* 是否为音频 track
Returns bool
IsVideo
* virtual bool IsVideo() = 0
* 是否为视频 track
Returns bool
IsMuted
* virtual bool IsMuted() = 0
* 是否 muted
Returns bool
SetMuted
* virtual void SetMuted(bool muted) = 0
* 设置是否静默该 track,静默后,SDK 将会发送静默帧数据
> 对于推 H264 源的 track,不支持 mute 操作
Parameters
* muted: bool
是否静默
SetVideoFrameListener
* virtual void SetVideoFrameListener([QNVideoFrameListener](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11226/QNVideoFrameListener-Linux)* listener) = 0
* 设置视频数据监听
Parameters
* listener: [QNVideoFrameListener](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11226/QNVideoFrameListener-Linux)
视频数据监听接口
SendSEI
* virtual void SendSEI(std::string& message,std::string& uuid,int32_t repeat_count) = 0
* 发送 SEI
Parameters
* message: string
消息内容
* uuid: string
唯一 ID
* repeat_count: int
重复次数, -1 为每一帧都发送
PushVideoFrame
* virtual int PushVideoFrame(const uint8_t* data,const uint32_t data_size,const int32_t width,const int32_t height,const int64_t timestamp_us,QNVideoFrameType video_frame_type,QNVideoRotation rotation,bool mirror = false) = 0
* 推送自定义视频帧
Parameters
* data: uint8_t*
视频数据
* data_size: uint32_t
数据长度
* width: int32_t
视频宽
* height: int32_t
视频高
* int64_t: timestamp_us
时间戳,单位:微妙
* video_frame_type: [QNVideoFrameType](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11300/QNVideoFrameType-Linux)
视频原始格式,支持:kI420 kYUY2 kRGB24
* rotation: [QNVideoRotation](https://developer.qiniu.com/rtc/11205/QNCustomVideoTrack-Linux/11301/QNVideoRotation-Linux)
导入后旋转角度,如果不需要旋转则使用默认值 kVideoRotation0 即可
* mirror: bool
是否镜像
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,792 |
QNCustomVideoTrackConfig | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNCustomVideoTrackConfig
# QNCustomVideoTrackConfig
最近更新时间: 2022-05-24 22:07:41
自定义视频采集 Track 的配置
Index
Properties
* encoder_config
* tag
* multi_profile_enabled
* frame_type
Properties
encoder_config
* encoder_config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/11206/QNCustomVideoTrackConfig-Linux/11225/QNVideoEncoderConfig-Linux)
* 设置摄像头采集数据编码参数
tag
* tag: string
* 自定义标签
multi_profile_enabled
* multi_profile_enabled: bool
* 是否开启多流
frame_type
* frame_type: [QNVideoFrameType](https://developer.qiniu.com/rtc/11206/QNCustomVideoTrackConfig-Linux/11300/QNVideoFrameType-Linux)
* 自定义数据帧类型
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNCustomVideoTrackConfig
# QNCustomVideoTrackConfig
最近更新时间: 2022-05-24 22:07:41
自定义视频采集 Track 的配置
Index
Properties
* encoder_config
* tag
* multi_profile_enabled
* frame_type
Properties
encoder_config
* encoder_config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/11206/QNCustomVideoTrackConfig-Linux/11225/QNVideoEncoderConfig-Linux)
* 设置摄像头采集数据编码参数
tag
* tag: string
* 自定义标签
multi_profile_enabled
* multi_profile_enabled: bool
* 是否开启多流
frame_type
* frame_type: [QNVideoFrameType](https://developer.qiniu.com/rtc/11206/QNCustomVideoTrackConfig-Linux/11300/QNVideoFrameType-Linux)
* 自定义数据帧类型
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,796 |
QNLocalVideoTrack | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNLocalVideoTrack
# QNLocalVideoTrack
最近更新时间: 2022-03-28 22:57:09
本地视频 Track 基类
Hierarchy
* [QNTrack](https://developer.qiniu.com/rtc/11209/QNLocalVideoTrack-Linux/11222/QNTrack-Linux)
* [QNLocalTrack](https://developer.qiniu.com/rtc/11209/QNLocalVideoTrack-Linux/11208/QNLocalTrack-Linux)
* QNLocalVideoTrack
* [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11209/QNLocalVideoTrack-Linux/11198/QNCameraVideoTrack-Linux)
* [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11209/QNLocalVideoTrack-Linux/11205/QNCustomVideoTrack-Linux)
* [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11209/QNLocalVideoTrack-Linux/11207/QNLocalAudioTrack-Linux)
* [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11209/QNLocalVideoTrack-Linux/11210/QNMicrophoneAudioTrack-Linux)
* [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11209/QNLocalVideoTrack-Linux/11203/QNCustomAudioTrack-Linux)
* [QNRemoteTrack](https://developer.qiniu.com/rtc/11209/QNLocalVideoTrack-Linux/11213/QNRemoteTrack-Linux)
* [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11209/QNLocalVideoTrack-Linux/11215/QNRemoteVideoTrack-Linux)
* [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11209/QNLocalVideoTrack-Linux/11212/QNRemoteAudioTrack-Linux)
Index
Core Methods
* GetTrackID
* GetUserID
* GetTag
* IsAudio
* IsVideo
* IsMuted
* SetMuted
* SetVideoFrameListener
* SendSEI
Core Methods
GetTrackID
* virtual const std::string& GetTrackID() = 0
* 获取 TrackID
Returns string
GetUserID
* virtual const std::string& GetUserID() = 0
* 获取 UserID
Returns string
GetTag
* virtual const std::string& GetTag() = 0
* 获取 Tag
Returns string
IsAudio
* virtual bool IsAudio() = 0
* 是否为音频 track
Returns bool
IsVideo
* virtual bool IsVideo() = 0
* 是否为视频 track
Returns bool
IsMuted
* virtual bool IsMuted() = 0
* 是否 muted
Returns bool
SetMuted
* virtual void SetMuted(bool muted) = 0
* 设置是否静默该 track,静默后,SDK 将会发送静默帧数据
Parameters
* muted: bool
是否静默
SetVideoFrameListener
* virtual void SetVideoFrameListener([QNVideoFrameListener](https://developer.qiniu.com/rtc/11209/QNLocalVideoTrack-Linux/11226/QNVideoFrameListener-Linux)* listener) = 0
* 设置视频数据监听
Parameters
* listener: [QNVideoFrameListener](https://developer.qiniu.com/rtc/11209/QNLocalVideoTrack-Linux/11226/QNVideoFrameListener-Linux)
视频数据监听接口
SendSEI
* virtual void SendSEI(std::string& message,std::string& uuid,int32_t repeat_count) = 0
* 发送 SEI
Parameters
* message: string
消息内容
* uuid: string
唯一 ID
* repeat_count: int
重复次数, -1 为每一帧都发送
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNLocalVideoTrack
# QNLocalVideoTrack
最近更新时间: 2022-03-28 22:57:09
本地视频 Track 基类
Hierarchy
* [QNTrack](https://developer.qiniu.com/rtc/11209/QNLocalVideoTrack-Linux/11222/QNTrack-Linux)
* [QNLocalTrack](https://developer.qiniu.com/rtc/11209/QNLocalVideoTrack-Linux/11208/QNLocalTrack-Linux)
* QNLocalVideoTrack
* [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11209/QNLocalVideoTrack-Linux/11198/QNCameraVideoTrack-Linux)
* [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11209/QNLocalVideoTrack-Linux/11205/QNCustomVideoTrack-Linux)
* [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11209/QNLocalVideoTrack-Linux/11207/QNLocalAudioTrack-Linux)
* [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11209/QNLocalVideoTrack-Linux/11210/QNMicrophoneAudioTrack-Linux)
* [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11209/QNLocalVideoTrack-Linux/11203/QNCustomAudioTrack-Linux)
* [QNRemoteTrack](https://developer.qiniu.com/rtc/11209/QNLocalVideoTrack-Linux/11213/QNRemoteTrack-Linux)
* [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11209/QNLocalVideoTrack-Linux/11215/QNRemoteVideoTrack-Linux)
* [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11209/QNLocalVideoTrack-Linux/11212/QNRemoteAudioTrack-Linux)
Index
Core Methods
* GetTrackID
* GetUserID
* GetTag
* IsAudio
* IsVideo
* IsMuted
* SetMuted
* SetVideoFrameListener
* SendSEI
Core Methods
GetTrackID
* virtual const std::string& GetTrackID() = 0
* 获取 TrackID
Returns string
GetUserID
* virtual const std::string& GetUserID() = 0
* 获取 UserID
Returns string
GetTag
* virtual const std::string& GetTag() = 0
* 获取 Tag
Returns string
IsAudio
* virtual bool IsAudio() = 0
* 是否为音频 track
Returns bool
IsVideo
* virtual bool IsVideo() = 0
* 是否为视频 track
Returns bool
IsMuted
* virtual bool IsMuted() = 0
* 是否 muted
Returns bool
SetMuted
* virtual void SetMuted(bool muted) = 0
* 设置是否静默该 track,静默后,SDK 将会发送静默帧数据
Parameters
* muted: bool
是否静默
SetVideoFrameListener
* virtual void SetVideoFrameListener([QNVideoFrameListener](https://developer.qiniu.com/rtc/11209/QNLocalVideoTrack-Linux/11226/QNVideoFrameListener-Linux)* listener) = 0
* 设置视频数据监听
Parameters
* listener: [QNVideoFrameListener](https://developer.qiniu.com/rtc/11209/QNLocalVideoTrack-Linux/11226/QNVideoFrameListener-Linux)
视频数据监听接口
SendSEI
* virtual void SendSEI(std::string& message,std::string& uuid,int32_t repeat_count) = 0
* 发送 SEI
Parameters
* message: string
消息内容
* uuid: string
唯一 ID
* repeat_count: int
重复次数, -1 为每一帧都发送
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,798 |
QNStretchMode | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNStretchMode
# QNStretchMode
最近更新时间: 2022-03-23 14:18:21
画面渲染窗口填充方式
Index
Enum
* QNStretchMode
Enum
QNStretchMode
* code | describe | message
---|---|---
kStretchInvalid | 无效值 | 无
kStretchFill | 在保持长宽比的前提下,缩放视频,使其充满容器 | 无
kStretchFit | 在保持长宽比的前提下,缩放视频,使其在容器内完整显示,边缘部分填充黑边 | 无
kStretchScaleToFit | 缩放视频,使其填充满容器,可能导致拉伸变形 | 无
Type declaration
* kStretchInvalid
* kStretchFill
* kStretchFit
* kStretchScaleToFit
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNStretchMode
# QNStretchMode
最近更新时间: 2022-03-23 14:18:21
画面渲染窗口填充方式
Index
Enum
* QNStretchMode
Enum
QNStretchMode
* code | describe | message
---|---|---
kStretchInvalid | 无效值 | 无
kStretchFill | 在保持长宽比的前提下,缩放视频,使其充满容器 | 无
kStretchFit | 在保持长宽比的前提下,缩放视频,使其在容器内完整显示,边缘部分填充黑边 | 无
kStretchScaleToFit | 缩放视频,使其填充满容器,可能导致拉伸变形 | 无
Type declaration
* kStretchInvalid
* kStretchFill
* kStretchFit
* kStretchScaleToFit
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,801 |
QNVideoDeviceState | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNVideoDeviceState
# QNVideoDeviceState
最近更新时间: 2022-03-28 23:01:02
摄像头设备状态,SDK 提供设备插拔状态的监控,以下用于标识设备被插入还是拔出设备状态变化后,建议通过
[QNRTC](https://developer.qiniu.com/rtc/11298/QNVideoDeviceState-
Linux/11216/QNRTC-Linux).GetCameraCount 重新获取摄像头设备列表
Index
Enum
* QNVideoDeviceState
Enum
QNVideoDeviceState
* code | describe | message
---|---|---
kVideoDeviceActive | 设备插入 | 无
kVideoDeviceLost | 设备拔出 | 无
Type declaration
* kVideoDeviceActive
* kVideoDeviceLost
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNVideoDeviceState
# QNVideoDeviceState
最近更新时间: 2022-03-28 23:01:02
摄像头设备状态,SDK 提供设备插拔状态的监控,以下用于标识设备被插入还是拔出设备状态变化后,建议通过
[QNRTC](https://developer.qiniu.com/rtc/11298/QNVideoDeviceState-
Linux/11216/QNRTC-Linux).GetCameraCount 重新获取摄像头设备列表
Index
Enum
* QNVideoDeviceState
Enum
QNVideoDeviceState
* code | describe | message
---|---|---
kVideoDeviceActive | 设备插入 | 无
kVideoDeviceLost | 设备拔出 | 无
Type declaration
* kVideoDeviceActive
* kVideoDeviceLost
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,802 |
QNConnectionDisconnectedInfo | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNConnectionDisconnectedInfo
# QNConnectionDisconnectedInfo
最近更新时间: 2022-03-28 23:01:49
房间断开时的相关信息
Index
Properties
* reason
* error_code
* error_message
Enum
* Reason
Properties
reason
* reason: Reason
* 获取用户房间断开的原因
code | describe | message
---|---|---
kLeave | 主动退出 | 无
kKickOut | 被服务端踢出房间 | 无
kRoomClosed | 房间被管理员关闭 | 请确认房间管理逻辑
kRoomFull | 房间人数已满,当房间已加入人数超过房间的人数限制时触发 | 请确认后台服务的设置
kRoomError | 异常断开 | 可通过 error code 查看异常断开的原因
error_code
* error_code: int
* 错误码
code | describe | message
---|---|---
QNRTC_OK | 主动退出房间 | 无
Err_Auth_Failed | 加入房间认证失败 | 服务验证时出错,可能为服务网络异常。建议重新尝试加入房间
Err_Token_Error | 房间 Token 错误 | 表示您提供的房间 token 不符合七牛 token 签算规则, 详情请参考[RoomToken 签发服务](https://doc.qnsdk.com/rtn/docs/server_overview#1)
Err_Token_Expired | 房间 Token 过期 | 表示您的房间 token 过期, 需要重新生成 token 再加入
Err_User_Already_Exist | 房间内已经有同名用户 | 后台如果配置为开启“禁止自动踢人”,则同一用户重复加入/未正常退出再加入会触发此错误
Err_Media_Not_Support | 媒体协商失败 | 表示该设备不支持指定的音视频格式,无法进行连麦的操作
Err_Fatal | 非预期错误 | 表示 RTC 生命周期异常,需要释放资源并重新初始化
Err_Reconnect_Failed | 内部重连失效 | 内部重连后出错,一般出现在网络非常不稳定时出现,建议提示用户并尝试重新加入房间。当发生该错误时,之前创建的转推任务将被服务销毁,如有需要,应在下次成功加入房间后按业务需要恢复
error_message
* error_message: string
* 获取错误信息的文字描述
Enum
Reason
* Type declaration
* kLeave
* kKickOut
* kRoomClosed
* kRoomFull
* kRoomError
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNConnectionDisconnectedInfo
# QNConnectionDisconnectedInfo
最近更新时间: 2022-03-28 23:01:49
房间断开时的相关信息
Index
Properties
* reason
* error_code
* error_message
Enum
* Reason
Properties
reason
* reason: Reason
* 获取用户房间断开的原因
code | describe | message
---|---|---
kLeave | 主动退出 | 无
kKickOut | 被服务端踢出房间 | 无
kRoomClosed | 房间被管理员关闭 | 请确认房间管理逻辑
kRoomFull | 房间人数已满,当房间已加入人数超过房间的人数限制时触发 | 请确认后台服务的设置
kRoomError | 异常断开 | 可通过 error code 查看异常断开的原因
error_code
* error_code: int
* 错误码
code | describe | message
---|---|---
QNRTC_OK | 主动退出房间 | 无
Err_Auth_Failed | 加入房间认证失败 | 服务验证时出错,可能为服务网络异常。建议重新尝试加入房间
Err_Token_Error | 房间 Token 错误 | 表示您提供的房间 token 不符合七牛 token 签算规则, 详情请参考[RoomToken 签发服务](https://doc.qnsdk.com/rtn/docs/server_overview#1)
Err_Token_Expired | 房间 Token 过期 | 表示您的房间 token 过期, 需要重新生成 token 再加入
Err_User_Already_Exist | 房间内已经有同名用户 | 后台如果配置为开启“禁止自动踢人”,则同一用户重复加入/未正常退出再加入会触发此错误
Err_Media_Not_Support | 媒体协商失败 | 表示该设备不支持指定的音视频格式,无法进行连麦的操作
Err_Fatal | 非预期错误 | 表示 RTC 生命周期异常,需要释放资源并重新初始化
Err_Reconnect_Failed | 内部重连失效 | 内部重连后出错,一般出现在网络非常不稳定时出现,建议提示用户并尝试重新加入房间。当发生该错误时,之前创建的转推任务将被服务销毁,如有需要,应在下次成功加入房间后按业务需要恢复
error_message
* error_message: string
* 获取错误信息的文字描述
Enum
Reason
* Type declaration
* kLeave
* kKickOut
* kRoomClosed
* kRoomFull
* kRoomError
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,804 |
QNMediaRelayConfiguration | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNMediaRelayConfiguration
# QNMediaRelayConfiguration
最近更新时间: 2022-03-28 23:03:38
跨房媒体转发配置信息
Index
Properties
* src_room_info
* dest_room_infos
Properties
src_room_info
* src_room_info: [QNMediaRelayInfo](https://developer.qiniu.com/rtc/11276/QNMediaRelayConfiguration-Linux/11277/QNMediaRelayInfo-Linux)
* 源房间信息
dest_room_infos
* dest_room_infos: std::vector<QNMediaRelayInfo>
* 目标房间信息
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNMediaRelayConfiguration
# QNMediaRelayConfiguration
最近更新时间: 2022-03-28 23:03:38
跨房媒体转发配置信息
Index
Properties
* src_room_info
* dest_room_infos
Properties
src_room_info
* src_room_info: [QNMediaRelayInfo](https://developer.qiniu.com/rtc/11276/QNMediaRelayConfiguration-Linux/11277/QNMediaRelayInfo-Linux)
* 源房间信息
dest_room_infos
* dest_room_infos: std::vector<QNMediaRelayInfo>
* 目标房间信息
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,807 |
QNCameraEventListener | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNCameraEventListener
# QNCameraEventListener
最近更新时间: 2022-03-28 23:04:31
摄像头开启,采集异常通知
Index
Core Methods
* OnCameraError
Core Methods
OnCameraError
* virtual void OnCameraError(int error_code, const std::string& error_message)
* 相机失败回调
Parameters
* error_code: int
详见错误码
[QNErrorCode](https://developer.qiniu.com/rtc/11194/QNCameraEventListener-
Linux/11369/error-code-linux)
* error_message: string
错误描述
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNCameraEventListener
# QNCameraEventListener
最近更新时间: 2022-03-28 23:04:31
摄像头开启,采集异常通知
Index
Core Methods
* OnCameraError
Core Methods
OnCameraError
* virtual void OnCameraError(int error_code, const std::string& error_message)
* 相机失败回调
Parameters
* error_code: int
详见错误码
[QNErrorCode](https://developer.qiniu.com/rtc/11194/QNCameraEventListener-
Linux/11369/error-code-linux)
* error_message: string
错误描述
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,808 |
QNRemoteAudioTrack | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNRemoteAudioTrack
# QNRemoteAudioTrack
最近更新时间: 2022-03-28 23:06:54
音频远端 Track 类
Hierarchy
* [QNTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11222/QNTrack-Linux)
* [QNLocalTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11208/QNLocalTrack-Linux)
* [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11209/QNLocalVideoTrack-Linux)
* [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11198/QNCameraVideoTrack-Linux)
* [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11205/QNCustomVideoTrack-Linux)
* [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11207/QNLocalAudioTrack-Linux)
* [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11210/QNMicrophoneAudioTrack-Linux)
* [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11203/QNCustomAudioTrack-Linux)
* [QNRemoteTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11213/QNRemoteTrack-Linux)
* [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11215/QNRemoteVideoTrack-Linux)
* QNRemoteAudioTrack
Index
Core Methods
* GetTrackID
* GetUserID
* GetTag
* IsAudio
* IsVideo
* IsMuted
* SetTrackInfoChangedListener
* IsSubscribed
* SetAudioFrameListener
* SetVolume
* GetVolumeLevel
Core Methods
GetTrackID
* virtual const std::string& GetTrackID() = 0
* 获取 TrackID
Returns string
GetUserID
* virtual const std::string& GetUserID() = 0
* 获取 UserID
Returns string
GetTag
* virtual const std::string& GetTag() = 0
* 获取 Tag
Returns string
IsAudio
* virtual bool IsAudio() = 0
* 是否为音频 track
Returns bool
IsVideo
* virtual bool IsVideo() = 0
* 是否为视频 track
Returns bool
IsMuted
* virtual bool IsMuted() = 0
* 是否 muted
Returns bool
SetTrackInfoChangedListener
* virtual void SetTrackInfoChangedListener([QNTrackInfoChangedListener](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11223/QNTrackInfoChangedListener-Linux)* listener) = 0
* 设置当前轨道信息变化监听器
Parameters
* listener: [QNTrackInfoChangedListener](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11223/QNTrackInfoChangedListener-Linux)
轨道信息变化监听器
IsSubscribed
* virtual bool IsSubscribed() = 0;
* 该 Track 是否被订阅
Returns bool
SetAudioFrameListener
* virtual void SetAudioFrameListener([QNAudioFrameListener](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11189/QNAudioFrameListener-Linux)* listener) = 0
* 设置是音频数据监听
Parameters
* listener: [QNAudioFrameListener](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11189/QNAudioFrameListener-Linux)
音频数据监听接口
SetVolume
* virtual void SetVolume(double volume) = 0
* 设置远端音频音量(不改变系统设备的音量)
Parameters
* volume: double
音量大小,[1.0-10.0], 默认为 1.0
GetVolumeLevel
* virtual float GetVolumeLevel() = 0
* 获取音频播放音量
Returns float
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNRemoteAudioTrack
# QNRemoteAudioTrack
最近更新时间: 2022-03-28 23:06:54
音频远端 Track 类
Hierarchy
* [QNTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11222/QNTrack-Linux)
* [QNLocalTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11208/QNLocalTrack-Linux)
* [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11209/QNLocalVideoTrack-Linux)
* [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11198/QNCameraVideoTrack-Linux)
* [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11205/QNCustomVideoTrack-Linux)
* [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11207/QNLocalAudioTrack-Linux)
* [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11210/QNMicrophoneAudioTrack-Linux)
* [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11203/QNCustomAudioTrack-Linux)
* [QNRemoteTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11213/QNRemoteTrack-Linux)
* [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11215/QNRemoteVideoTrack-Linux)
* QNRemoteAudioTrack
Index
Core Methods
* GetTrackID
* GetUserID
* GetTag
* IsAudio
* IsVideo
* IsMuted
* SetTrackInfoChangedListener
* IsSubscribed
* SetAudioFrameListener
* SetVolume
* GetVolumeLevel
Core Methods
GetTrackID
* virtual const std::string& GetTrackID() = 0
* 获取 TrackID
Returns string
GetUserID
* virtual const std::string& GetUserID() = 0
* 获取 UserID
Returns string
GetTag
* virtual const std::string& GetTag() = 0
* 获取 Tag
Returns string
IsAudio
* virtual bool IsAudio() = 0
* 是否为音频 track
Returns bool
IsVideo
* virtual bool IsVideo() = 0
* 是否为视频 track
Returns bool
IsMuted
* virtual bool IsMuted() = 0
* 是否 muted
Returns bool
SetTrackInfoChangedListener
* virtual void SetTrackInfoChangedListener([QNTrackInfoChangedListener](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11223/QNTrackInfoChangedListener-Linux)* listener) = 0
* 设置当前轨道信息变化监听器
Parameters
* listener: [QNTrackInfoChangedListener](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11223/QNTrackInfoChangedListener-Linux)
轨道信息变化监听器
IsSubscribed
* virtual bool IsSubscribed() = 0;
* 该 Track 是否被订阅
Returns bool
SetAudioFrameListener
* virtual void SetAudioFrameListener([QNAudioFrameListener](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11189/QNAudioFrameListener-Linux)* listener) = 0
* 设置是音频数据监听
Parameters
* listener: [QNAudioFrameListener](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11189/QNAudioFrameListener-Linux)
音频数据监听接口
SetVolume
* virtual void SetVolume(double volume) = 0
* 设置远端音频音量(不改变系统设备的音量)
Parameters
* volume: double
音量大小,[1.0-10.0], 默认为 1.0
GetVolumeLevel
* virtual float GetVolumeLevel() = 0
* 获取音频播放音量
Returns float
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,809 |
QNNetworkGrade | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNNetworkGrade
# QNNetworkGrade
最近更新时间: 2022-03-23 14:05:14
网络状态
Index
Properties
* kINVALID
* kEXCELLENT
* kGOOD
* kFAIR
* kPOOR
Properties
kINVALID
* kINVALID: QNNetworkGrade
* 当前网络未知
kEXCELLENT
* kEXCELLENT: QNNetworkGrade
* 当前网络优秀
kGOOD
* kGOOD: QNNetworkGrade
* 当前网络良好
kFAIR
* kFAIR: QNNetworkGrade
* 当前网络一般
kPOOR
* kPOOR: QNNetworkGrade
* 当前网络较差
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNNetworkGrade
# QNNetworkGrade
最近更新时间: 2022-03-23 14:05:14
网络状态
Index
Properties
* kINVALID
* kEXCELLENT
* kGOOD
* kFAIR
* kPOOR
Properties
kINVALID
* kINVALID: QNNetworkGrade
* 当前网络未知
kEXCELLENT
* kEXCELLENT: QNNetworkGrade
* 当前网络优秀
kGOOD
* kGOOD: QNNetworkGrade
* 当前网络良好
kFAIR
* kFAIR: QNNetworkGrade
* 当前网络一般
kPOOR
* kPOOR: QNNetworkGrade
* 当前网络较差
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,813 |
QNRemoteAudioTrackStats | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNRemoteAudioTrackStats
# QNRemoteAudioTrackStats
最近更新时间: 2022-03-23 14:09:47
订阅远端的音频统计信息
Index
Properties
* downlink_bitrate
* downlink_lostrate
* uplink_rtt
* uplink_lostrate
Properties
downlink_bitrate
* downlink_bitrate: int32_t
* 下行音频码率
downlink_lostrate
* downlink_lostrate: int32_t
* 下行网络丢包率
uplink_rtt
* uplink_rtt: int32_t
* 上行网络 rtt
uplink_lostrate
* uplink_lostrate: int32_t
* 上行网络丢包率
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNRemoteAudioTrackStats
# QNRemoteAudioTrackStats
最近更新时间: 2022-03-23 14:09:47
订阅远端的音频统计信息
Index
Properties
* downlink_bitrate
* downlink_lostrate
* uplink_rtt
* uplink_lostrate
Properties
downlink_bitrate
* downlink_bitrate: int32_t
* 下行音频码率
downlink_lostrate
* downlink_lostrate: int32_t
* 下行网络丢包率
uplink_rtt
* uplink_rtt: int32_t
* 上行网络 rtt
uplink_lostrate
* uplink_lostrate: int32_t
* 上行网络丢包率
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,814 |
QNTrackProfile | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNTrackProfile
# QNTrackProfile
最近更新时间: 2022-03-23 14:19:14
Track 质量等级
Index
Enum
* QNTrackProfile
Enum
QNTrackProfile
* code | describe | message
---|---|---
kHigh | 高质量 | 无
kMedium | 普通质量 | 无
kLow | 低质量 | 无
Type declaration
* kHigh
* kMedium
* kLow
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNTrackProfile
# QNTrackProfile
最近更新时间: 2022-03-23 14:19:14
Track 质量等级
Index
Enum
* QNTrackProfile
Enum
QNTrackProfile
* code | describe | message
---|---|---
kHigh | 高质量 | 无
kMedium | 普通质量 | 无
kLow | 低质量 | 无
Type declaration
* kHigh
* kMedium
* kLow
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,815 |
QNNetworkQuality | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNNetworkQuality
# QNNetworkQuality
最近更新时间: 2022-03-28 23:10:44
网络上下行质量
Index
Properties
* uplink_network_grade
* downlink_network_grade
Properties
uplink_network_grade
* uplink_network_grade: [QNNetworkGrade](https://developer.qiniu.com/rtc/11281/QNNetworkQuality-Linux/11280/QNNetworkGrade-Linux)
* 当前网络上行质量
downlink_network_grade
* downlink_network_grade: [QNNetworkGrade](https://developer.qiniu.com/rtc/11281/QNNetworkQuality-Linux/11280/QNNetworkGrade-Linux)
* 当前网络下行质量
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNNetworkQuality
# QNNetworkQuality
最近更新时间: 2022-03-28 23:10:44
网络上下行质量
Index
Properties
* uplink_network_grade
* downlink_network_grade
Properties
uplink_network_grade
* uplink_network_grade: [QNNetworkGrade](https://developer.qiniu.com/rtc/11281/QNNetworkQuality-Linux/11280/QNNetworkGrade-Linux)
* 当前网络上行质量
downlink_network_grade
* downlink_network_grade: [QNNetworkGrade](https://developer.qiniu.com/rtc/11281/QNNetworkQuality-Linux/11280/QNNetworkGrade-Linux)
* 当前网络下行质量
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,816 |
QNPublishResultCallback | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNPublishResultCallback
# QNPublishResultCallback
最近更新时间: 2022-03-23 14:08:11
发布结果回调接口
Index
Core Methods
* OnPublished
* OnPublishError
Core Methods
OnPublished
* virtual void OnPublished() = 0
* 发布成功后触发此回调
OnPublishError
* virtual void OnPublishError(int error_code, const std::string& error_message) = 0
* 发布成功后触发此回调
Parameters
* error_code: int
错误码
* error_message: string
错误消息
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNPublishResultCallback
# QNPublishResultCallback
最近更新时间: 2022-03-23 14:08:11
发布结果回调接口
Index
Core Methods
* OnPublished
* OnPublishError
Core Methods
OnPublished
* virtual void OnPublished() = 0
* 发布成功后触发此回调
OnPublishError
* virtual void OnPublishError(int error_code, const std::string& error_message) = 0
* 发布成功后触发此回调
Parameters
* error_code: int
错误码
* error_message: string
错误消息
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,817 |
QNRemoteVideoTrack | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNRemoteVideoTrack
# QNRemoteVideoTrack
最近更新时间: 2022-03-28 23:20:04
视频远端 Track 类
Hierarchy
* [QNTrack](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11222/QNTrack-Linux)
* [QNLocalTrack](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11208/QNLocalTrack-Linux)
* [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11209/QNLocalVideoTrack-Linux)
* [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11198/QNCameraVideoTrack-Linux)
* [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11205/QNCustomVideoTrack-Linux)
* [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11207/QNLocalAudioTrack-Linux)
* [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11210/QNMicrophoneAudioTrack-Linux)
* [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11203/QNCustomAudioTrack-Linux)
* [QNRemoteTrack](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11213/QNRemoteTrack-Linux)
* QNRemoteVideoTrack
* [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11212/QNRemoteAudioTrack-Linux)
Index
Core Methods
* GetTrackID
* GetUserID
* GetTag
* IsAudio
* IsVideo
* IsMuted
* SetTrackInfoChangedListener
* IsSubscribed
* SetVideoFrameListener
* IsMultiProfileEnabled
* SetProfile
Core Methods
GetTrackID
* virtual const std::string& GetTrackID() = 0
* 获取 TrackID
Returns string
GetUserID
* virtual const std::string& GetUserID() = 0
* 获取 UserID
Returns string
GetTag
* virtual const std::string& GetTag() = 0
* 获取 Tag
Returns string
IsAudio
* virtual bool IsAudio() = 0
* 是否为音频 track
Returns bool
IsVideo
* virtual bool IsVideo() = 0
* 是否为视频 track
Returns bool
IsMuted
* virtual bool IsMuted() = 0
* 是否 muted
Returns bool
SetTrackInfoChangedListener
* virtual void SetTrackInfoChangedListener([QNTrackInfoChangedListener](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11223/QNTrackInfoChangedListener-Linux)* listener) = 0
* 设置当前轨道信息变化监听器
Parameters
* listener: [QNTrackInfoChangedListener](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11223/QNTrackInfoChangedListener-Linux)
轨道信息变化监听器
IsSubscribed
* virtual bool IsSubscribed() = 0;
* 该 Track 是否被订阅
Returns bool
SetVideoFrameListener
* virtual void SetVideoFrameListener([QNVideoFrameListener](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11226/QNVideoFrameListener-Linux)* listener) = 0
* 设置视频数据监听
Parameters
* listener: [QNVideoFrameListener](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11226/QNVideoFrameListener-Linux)
视频数据监听接口
IsMultiProfileEnabled
* virtual bool IsMultiProfileEnabled() = 0
* 获取当前 track 是否开启了大小流发布
Returns bool
SetProfile
* virtual void SetProfile([QNTrackProfile](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11293/QNTrackProfile-Linux) profile) = 0
* 设置当前视频轨道质量等级
Parameters
* profile: [QNTrackProfile](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11293/QNTrackProfile-Linux)
视频质量
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNRemoteVideoTrack
# QNRemoteVideoTrack
最近更新时间: 2022-03-28 23:20:04
视频远端 Track 类
Hierarchy
* [QNTrack](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11222/QNTrack-Linux)
* [QNLocalTrack](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11208/QNLocalTrack-Linux)
* [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11209/QNLocalVideoTrack-Linux)
* [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11198/QNCameraVideoTrack-Linux)
* [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11205/QNCustomVideoTrack-Linux)
* [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11207/QNLocalAudioTrack-Linux)
* [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11210/QNMicrophoneAudioTrack-Linux)
* [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11203/QNCustomAudioTrack-Linux)
* [QNRemoteTrack](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11213/QNRemoteTrack-Linux)
* QNRemoteVideoTrack
* [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11212/QNRemoteAudioTrack-Linux)
Index
Core Methods
* GetTrackID
* GetUserID
* GetTag
* IsAudio
* IsVideo
* IsMuted
* SetTrackInfoChangedListener
* IsSubscribed
* SetVideoFrameListener
* IsMultiProfileEnabled
* SetProfile
Core Methods
GetTrackID
* virtual const std::string& GetTrackID() = 0
* 获取 TrackID
Returns string
GetUserID
* virtual const std::string& GetUserID() = 0
* 获取 UserID
Returns string
GetTag
* virtual const std::string& GetTag() = 0
* 获取 Tag
Returns string
IsAudio
* virtual bool IsAudio() = 0
* 是否为音频 track
Returns bool
IsVideo
* virtual bool IsVideo() = 0
* 是否为视频 track
Returns bool
IsMuted
* virtual bool IsMuted() = 0
* 是否 muted
Returns bool
SetTrackInfoChangedListener
* virtual void SetTrackInfoChangedListener([QNTrackInfoChangedListener](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11223/QNTrackInfoChangedListener-Linux)* listener) = 0
* 设置当前轨道信息变化监听器
Parameters
* listener: [QNTrackInfoChangedListener](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11223/QNTrackInfoChangedListener-Linux)
轨道信息变化监听器
IsSubscribed
* virtual bool IsSubscribed() = 0;
* 该 Track 是否被订阅
Returns bool
SetVideoFrameListener
* virtual void SetVideoFrameListener([QNVideoFrameListener](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11226/QNVideoFrameListener-Linux)* listener) = 0
* 设置视频数据监听
Parameters
* listener: [QNVideoFrameListener](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11226/QNVideoFrameListener-Linux)
视频数据监听接口
IsMultiProfileEnabled
* virtual bool IsMultiProfileEnabled() = 0
* 获取当前 track 是否开启了大小流发布
Returns bool
SetProfile
* virtual void SetProfile([QNTrackProfile](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11293/QNTrackProfile-Linux) profile) = 0
* 设置当前视频轨道质量等级
Parameters
* profile: [QNTrackProfile](https://developer.qiniu.com/rtc/11215/QNRemoteVideoTrack-Linux/11293/QNTrackProfile-Linux)
视频质量
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,818 |
QNCameraDeviceInfo | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNCameraDeviceInfo
# QNCameraDeviceInfo
最近更新时间: 2022-03-28 23:21:50
摄像头设备信息
Index
Properties
* id
* name
* capabilities
Properties
id
* id: string
* 设备 Id,用于系统内做标识
name
* name: string
* 设备名
capabilities
* capabilities: std::vector<[QNCameraCapability](https://developer.qiniu.com/rtc/11193/QNCameraDeviceInfo-Linux/11258/QNCameraCapability-Linux)>
* 此摄像头所支持的采集能力列表
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNCameraDeviceInfo
# QNCameraDeviceInfo
最近更新时间: 2022-03-28 23:21:50
摄像头设备信息
Index
Properties
* id
* name
* capabilities
Properties
id
* id: string
* 设备 Id,用于系统内做标识
name
* name: string
* 设备名
capabilities
* capabilities: std::vector<[QNCameraCapability](https://developer.qiniu.com/rtc/11193/QNCameraDeviceInfo-Linux/11258/QNCameraCapability-Linux)>
* 此摄像头所支持的采集能力列表
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,822 |
QNMicrophoneAudioTrackConfig | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNMicrophoneAudioTrackConfig
# QNMicrophoneAudioTrackConfig
最近更新时间: 2022-03-28 23:23:21
麦克风音频采集 Track 的配置
Index
Properties
* audio_quality
* tag
Properties
audio_quality
* audio_quality: [QNAudioQuality](https://developer.qiniu.com/rtc/11211/QNMicrophoneAudioTrackConfig-Linux/11190/QNAudioQuality-Linux)
* 设置音频质量
tag
* tag: string
* 自定义标签
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNMicrophoneAudioTrackConfig
# QNMicrophoneAudioTrackConfig
最近更新时间: 2022-03-28 23:23:21
麦克风音频采集 Track 的配置
Index
Properties
* audio_quality
* tag
Properties
audio_quality
* audio_quality: [QNAudioQuality](https://developer.qiniu.com/rtc/11211/QNMicrophoneAudioTrackConfig-Linux/11190/QNAudioQuality-Linux)
* 设置音频质量
tag
* tag: string
* 自定义标签
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,823 |
QNTransportPolicy | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNTransportPolicy
# QNTransportPolicy
最近更新时间: 2022-03-23 14:22:05
媒体传输协议配置
Index
Enum
* QNTransportPolicy
Enum
QNTransportPolicy
* code | describe | message
---|---|---
kForceUDP | 强制 UDP | 无
kForceTCP | 强制 TCP | 无
kPreferUDP | 优先 UDP | 默认为 kPreferUDP,当用户网络下 UDP 不通时,SDK 自动降级使用 TCP
Type declaration
* kForceUDP
* kForceTCP
* kPreferUDP
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNTransportPolicy
# QNTransportPolicy
最近更新时间: 2022-03-23 14:22:05
媒体传输协议配置
Index
Enum
* QNTransportPolicy
Enum
QNTransportPolicy
* code | describe | message
---|---|---
kForceUDP | 强制 UDP | 无
kForceTCP | 强制 TCP | 无
kPreferUDP | 优先 UDP | 默认为 kPreferUDP,当用户网络下 UDP 不通时,SDK 自动降级使用 TCP
Type declaration
* kForceUDP
* kForceTCP
* kPreferUDP
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,824 |
QNClientRole | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNClientRole
# QNClientRole
最近更新时间: 2022-03-28 23:24:53
角色类型,当前仅适用于互动直播场景,通过
[QNRTCClient.SetClientRole](https://developer.qiniu.com/rtc/11263/QNClientRole-
Linux/11288) 来进行设置
Index
Properties
* kBroadcaster
* kAudience
Properties
kBroadcaster
* kBroadcaster: QNClientRole
* 主播角色,拥有发布和订阅媒体流的权限,仅适用于互动直播场景
kAudience
* kAudience: QNClientRole
* 观众角色,仅有订阅媒体流的权限,仅适用于互动直播场景
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNClientRole
# QNClientRole
最近更新时间: 2022-03-28 23:24:53
角色类型,当前仅适用于互动直播场景,通过
[QNRTCClient.SetClientRole](https://developer.qiniu.com/rtc/11263/QNClientRole-
Linux/11288) 来进行设置
Index
Properties
* kBroadcaster
* kAudience
Properties
kBroadcaster
* kBroadcaster: QNClientRole
* 主播角色,拥有发布和订阅媒体流的权限,仅适用于互动直播场景
kAudience
* kAudience: QNClientRole
* 观众角色,仅有订阅媒体流的权限,仅适用于互动直播场景
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,825 |
QNFocusCoordinates | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNFocusCoordinates
# QNFocusCoordinates
最近更新时间: 2022-03-23 13:54:54
焦点坐标信息
Index
Properties
* x
* y
* width
* height
Properties
x
* x: float
* 焦点 x 坐标
y
* y: float
* 焦点 y 坐标
width
* width: int
* 焦点 width
height
* height: int
* 焦点 height
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNFocusCoordinates
# QNFocusCoordinates
最近更新时间: 2022-03-23 13:54:54
焦点坐标信息
Index
Properties
* x
* y
* width
* height
Properties
x
* x: float
* 焦点 x 坐标
y
* y: float
* 焦点 y 坐标
width
* width: int
* 焦点 width
height
* height: int
* 焦点 height
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,826 |
QNLiveStreamingErrorInfo | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNLiveStreamingErrorInfo
# QNLiveStreamingErrorInfo
最近更新时间: 2022-03-23 13:56:54
CDN 转推结果信息
Index
Properties
* type
* code
* message
Enum
* Type
Properties
type
* type: Type
* 转推类型
code | describe | message
---|---|---
kStart | 开始转推 | 无
kStop | 停止转推 | 无
kUpdate | 更新转推 track | 无
code
* code: int32_t
* 错误码
message
* message: string
* 错误信息
Enum
Type
* Type declaration
* kStart
* kStop
* kUpdate
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNLiveStreamingErrorInfo
# QNLiveStreamingErrorInfo
最近更新时间: 2022-03-23 13:56:54
CDN 转推结果信息
Index
Properties
* type
* code
* message
Enum
* Type
Properties
type
* type: Type
* 转推类型
code | describe | message
---|---|---
kStart | 开始转推 | 无
kStop | 停止转推 | 无
kUpdate | 更新转推 track | 无
code
* code: int32_t
* 错误码
message
* message: string
* 错误信息
Enum
Type
* Type declaration
* kStart
* kStop
* kUpdate
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,827 |
QNTrack | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNTrack
# QNTrack
最近更新时间: 2022-03-28 23:26:10
音视频 Track 基类
Hierarchy
* QNTrack
* [QNLocalTrack](https://developer.qiniu.com/rtc/11222/QNTrack-Linux/11208/QNLocalTrack-Linux)
* [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11222/QNTrack-Linux/11209/QNLocalVideoTrack-Linux)
* [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11222/QNTrack-Linux/11198/QNCameraVideoTrack-Linux)
* [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11222/QNTrack-Linux/11205/QNCustomVideoTrack-Linux)
* [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11222/QNTrack-Linux/11207/QNLocalAudioTrack-Linux)
* [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11222/QNTrack-Linux/11210/QNMicrophoneAudioTrack-Linux)
* [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11222/QNTrack-Linux/11203/QNCustomAudioTrack-Linux)
* [QNRemoteTrack](https://developer.qiniu.com/rtc/11222/QNTrack-Linux/11213/QNRemoteTrack-Linux)
* [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11222/QNTrack-Linux/11215/QNRemoteVideoTrack-Linux)
* [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11222/QNTrack-Linux/11212/QNRemoteAudioTrack-Linux)
Index
Core Methods
* GetTrackID
* GetUserID
* GetTag
* IsAudio
* IsVideo
* IsMuted
Core Methods
GetTrackID
* virtual const std::string& GetTrackID() = 0
* 获取 TrackID
Returns string
GetUserID
* virtual const std::string& GetUserID() = 0
* 获取 UserID
Returns string
GetTag
* virtual const std::string& GetTag() = 0
* 获取 Tag
Returns string
IsAudio
* virtual bool IsAudio() = 0
* 是否为音频 track
Returns bool
IsVideo
* virtual bool IsVideo() = 0
* 是否为视频 track
Returns bool
IsMuted
* virtual bool IsMuted() = 0
* 是否 muted
Returns bool
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNTrack
# QNTrack
最近更新时间: 2022-03-28 23:26:10
音视频 Track 基类
Hierarchy
* QNTrack
* [QNLocalTrack](https://developer.qiniu.com/rtc/11222/QNTrack-Linux/11208/QNLocalTrack-Linux)
* [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11222/QNTrack-Linux/11209/QNLocalVideoTrack-Linux)
* [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11222/QNTrack-Linux/11198/QNCameraVideoTrack-Linux)
* [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11222/QNTrack-Linux/11205/QNCustomVideoTrack-Linux)
* [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11222/QNTrack-Linux/11207/QNLocalAudioTrack-Linux)
* [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11222/QNTrack-Linux/11210/QNMicrophoneAudioTrack-Linux)
* [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11222/QNTrack-Linux/11203/QNCustomAudioTrack-Linux)
* [QNRemoteTrack](https://developer.qiniu.com/rtc/11222/QNTrack-Linux/11213/QNRemoteTrack-Linux)
* [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11222/QNTrack-Linux/11215/QNRemoteVideoTrack-Linux)
* [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11222/QNTrack-Linux/11212/QNRemoteAudioTrack-Linux)
Index
Core Methods
* GetTrackID
* GetUserID
* GetTag
* IsAudio
* IsVideo
* IsMuted
Core Methods
GetTrackID
* virtual const std::string& GetTrackID() = 0
* 获取 TrackID
Returns string
GetUserID
* virtual const std::string& GetUserID() = 0
* 获取 UserID
Returns string
GetTag
* virtual const std::string& GetTag() = 0
* 获取 Tag
Returns string
IsAudio
* virtual bool IsAudio() = 0
* 是否为音频 track
Returns bool
IsVideo
* virtual bool IsVideo() = 0
* 是否为视频 track
Returns bool
IsMuted
* virtual bool IsMuted() = 0
* 是否 muted
Returns bool
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,828 |
QNMediaRelayListener | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNMediaRelayListener
# QNMediaRelayListener
最近更新时间: 2022-03-28 23:27:25
跨房媒体转发回调接口,可通过调用
[QNRTCClient.StartMediaRelay](https://developer.qiniu.com/rtc/11278/QNMediaRelayListener-
Linux/11288) 等方法传入
Index
Core Methods
* OnMediaRelayResult
* OnMediaRelayError
Core Methods
OnMediaRelayResult
* virtual void OnMediaRelayResult(std::map<std::string, QNMediaRelayState> state_map) = 0
* 跨房媒体转发操作成功
> 注意:此接口回调的是全量的跨房状态,包含所有跨房目标。具体每个目标房间是否转发成功,需要参考回调参数中目标房间对应的
> [QNMediaRelayState](https://developer.qiniu.com/rtc/11278/QNMediaRelayListener-
> Linux/11279/QNMediaRelayState-Linux)
Parameters
* state_map: Map<String, [QNMediaRelayState](https://developer.qiniu.com/rtc/11278/QNMediaRelayListener-Linux/11279/QNMediaRelayState-Linux)>
具体目标房间状态, key 为房间名, value 为状态
OnMediaRelayError
* virtual void OnMediaRelayError(int error_code, const std::string& error_message) = 0
* 接口失败回调
code | describe | message
---|---|---
Err_Invalid_Client_Mode | 使用场景不符 | 请确认当前场景为互动直播,通信场景不支持角色设置
Err_Invalid_Client_Role | 用户角色不符 | 请确认当前角色为主播,观众角色不支持跨房媒体转发
Err_Relay_Token_Invalid | Token 验证失败 | 请确认 Token 是否正确
Parameters
* error_code: int
错误码
* error_message: string
错误描述
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNMediaRelayListener
# QNMediaRelayListener
最近更新时间: 2022-03-28 23:27:25
跨房媒体转发回调接口,可通过调用
[QNRTCClient.StartMediaRelay](https://developer.qiniu.com/rtc/11278/QNMediaRelayListener-
Linux/11288) 等方法传入
Index
Core Methods
* OnMediaRelayResult
* OnMediaRelayError
Core Methods
OnMediaRelayResult
* virtual void OnMediaRelayResult(std::map<std::string, QNMediaRelayState> state_map) = 0
* 跨房媒体转发操作成功
> 注意:此接口回调的是全量的跨房状态,包含所有跨房目标。具体每个目标房间是否转发成功,需要参考回调参数中目标房间对应的
> [QNMediaRelayState](https://developer.qiniu.com/rtc/11278/QNMediaRelayListener-
> Linux/11279/QNMediaRelayState-Linux)
Parameters
* state_map: Map<String, [QNMediaRelayState](https://developer.qiniu.com/rtc/11278/QNMediaRelayListener-Linux/11279/QNMediaRelayState-Linux)>
具体目标房间状态, key 为房间名, value 为状态
OnMediaRelayError
* virtual void OnMediaRelayError(int error_code, const std::string& error_message) = 0
* 接口失败回调
code | describe | message
---|---|---
Err_Invalid_Client_Mode | 使用场景不符 | 请确认当前场景为互动直播,通信场景不支持角色设置
Err_Invalid_Client_Role | 用户角色不符 | 请确认当前角色为主播,观众角色不支持跨房媒体转发
Err_Relay_Token_Invalid | Token 验证失败 | 请确认 Token 是否正确
Parameters
* error_code: int
错误码
* error_message: string
错误描述
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,830 |
QNTranscodingLiveStreamingImage | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNTranscodingLiveStreamingImage
# QNTranscodingLiveStreamingImage
最近更新时间: 2022-03-23 14:20:46
合流背景、水印配置参数
Index
Properties
* layer_url
* x
* y
* layer_width
* layer_height
Properties
layer_url
* layer_url: string
* 合流背景、水印图片 http 网路地址
x
* x: int
* 在合流画面中的 x 坐标
y
* y: int
* 在合流画面中的 y 坐标
layer_width
* layer_width: int
* 该图片占宽
layer_height
* layer_height: int
* 该图片占高
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNTranscodingLiveStreamingImage
# QNTranscodingLiveStreamingImage
最近更新时间: 2022-03-23 14:20:46
合流背景、水印配置参数
Index
Properties
* layer_url
* x
* y
* layer_width
* layer_height
Properties
layer_url
* layer_url: string
* 合流背景、水印图片 http 网路地址
x
* x: int
* 在合流画面中的 x 坐标
y
* y: int
* 在合流画面中的 y 坐标
layer_width
* layer_width: int
* 该图片占宽
layer_height
* layer_height: int
* 该图片占高
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,833 |
QNRemoteUser | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNRemoteUser
# QNRemoteUser
最近更新时间: 2022-03-28 23:31:36
远端用户信息
Index
Properties
* user_id
* user_data
* remote_audio_track_list
* remote_video_track_list
Properties
user_id
* user_id: string
* 远端用户的 userID
user_data
* user_data: string
* 远端用户数据
remote_audio_track_list
* remote_audio_track_list: std::list<[QNRemoteAudioTrack*](https://developer.qiniu.com/rtc/11214/QNRemoteUser-Linux/undefined)>
* 远端用户发布的音频 track 列表
remote_video_track_list
* remote_video_track_list: std::list<[QNRemoteVideoTrack*](https://developer.qiniu.com/rtc/11214/QNRemoteUser-Linux/undefined)>
* 远端用户发布的视频 track 列表
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNRemoteUser
# QNRemoteUser
最近更新时间: 2022-03-28 23:31:36
远端用户信息
Index
Properties
* user_id
* user_data
* remote_audio_track_list
* remote_video_track_list
Properties
user_id
* user_id: string
* 远端用户的 userID
user_data
* user_data: string
* 远端用户数据
remote_audio_track_list
* remote_audio_track_list: std::list<[QNRemoteAudioTrack*](https://developer.qiniu.com/rtc/11214/QNRemoteUser-Linux/undefined)>
* 远端用户发布的音频 track 列表
remote_video_track_list
* remote_video_track_list: std::list<[QNRemoteVideoTrack*](https://developer.qiniu.com/rtc/11214/QNRemoteUser-Linux/undefined)>
* 远端用户发布的视频 track 列表
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,834 |
QNNetworkQualityListener | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNNetworkQualityListener
# QNNetworkQualityListener
最近更新时间: 2022-03-28 23:32:18
网络状态监听
Index
Core Methods
* OnNetworkQualityNotified
Core Methods
OnNetworkQualityNotified
* virtual void OnNetworkQualityNotified(const [QNNetworkQuality](https://developer.qiniu.com/rtc/11282/QNNetworkQualityListener-Linux/11281/QNNetworkQuality-Linux)& quality) = 0
* 近端网络状态回调
Parameters
* quality: [QNNetworkQuality](https://developer.qiniu.com/rtc/11282/QNNetworkQualityListener-Linux/11281/QNNetworkQuality-Linux)
网络质量
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNNetworkQualityListener
# QNNetworkQualityListener
最近更新时间: 2022-03-28 23:32:18
网络状态监听
Index
Core Methods
* OnNetworkQualityNotified
Core Methods
OnNetworkQualityNotified
* virtual void OnNetworkQualityNotified(const [QNNetworkQuality](https://developer.qiniu.com/rtc/11282/QNNetworkQualityListener-Linux/11281/QNNetworkQuality-Linux)& quality) = 0
* 近端网络状态回调
Parameters
* quality: [QNNetworkQuality](https://developer.qiniu.com/rtc/11282/QNNetworkQualityListener-Linux/11281/QNNetworkQuality-Linux)
网络质量
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,836 |
QNRTCEventListener | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNRTCEventListener
# QNRTCEventListener
最近更新时间: 2022-03-28 23:35:16
QNRTC 全局事件回调接口,用来监听设备相关的回调事件。可以在 QNRTC 的初始化函数 QNRTC.init 中传入。
Index
Core Methods
* OnVideoDeviceStateChanged
* OnAudioDeviceStateChanged
Core Methods
OnVideoDeviceStateChanged
* virtual void OnVideoDeviceStateChanged([QNVideoDeviceState](https://developer.qiniu.com/rtc/11217/QNRTCEventListener-Linux/11298/QNVideoDeviceState-Linux) device_state, const std::string& device_name)
* 摄像头插拔消息通知
Parameters
* device_state: [QNVideoDeviceState](https://developer.qiniu.com/rtc/11217/QNRTCEventListener-Linux/11298/QNVideoDeviceState-Linux)
摄像头设备状态
* device_name: string
摄像头设备名
OnAudioDeviceStateChanged
* virtual void OnAudioDeviceStateChanged([QNAudioDeviceState](https://developer.qiniu.com/rtc/11217/QNRTCEventListener-Linux/11257/QNAudioDeviceState-Linux) device_state, const std::string& device_guid)
* 音频设备插拔消息通知
Parameters
* device_state: [QNAudioDeviceState](https://developer.qiniu.com/rtc/11217/QNRTCEventListener-Linux/11257/QNAudioDeviceState-Linux)
设备状态设备状态
* device_guid: string
音频设备 id
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNRTCEventListener
# QNRTCEventListener
最近更新时间: 2022-03-28 23:35:16
QNRTC 全局事件回调接口,用来监听设备相关的回调事件。可以在 QNRTC 的初始化函数 QNRTC.init 中传入。
Index
Core Methods
* OnVideoDeviceStateChanged
* OnAudioDeviceStateChanged
Core Methods
OnVideoDeviceStateChanged
* virtual void OnVideoDeviceStateChanged([QNVideoDeviceState](https://developer.qiniu.com/rtc/11217/QNRTCEventListener-Linux/11298/QNVideoDeviceState-Linux) device_state, const std::string& device_name)
* 摄像头插拔消息通知
Parameters
* device_state: [QNVideoDeviceState](https://developer.qiniu.com/rtc/11217/QNRTCEventListener-Linux/11298/QNVideoDeviceState-Linux)
摄像头设备状态
* device_name: string
摄像头设备名
OnAudioDeviceStateChanged
* virtual void OnAudioDeviceStateChanged([QNAudioDeviceState](https://developer.qiniu.com/rtc/11217/QNRTCEventListener-Linux/11257/QNAudioDeviceState-Linux) device_state, const std::string& device_guid)
* 音频设备插拔消息通知
Parameters
* device_state: [QNAudioDeviceState](https://developer.qiniu.com/rtc/11217/QNRTCEventListener-Linux/11257/QNAudioDeviceState-Linux)
设备状态设备状态
* device_guid: string
音频设备 id
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,837 |
QNAudioDevice | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNAudioDevice
# QNAudioDevice
最近更新时间: 2022-03-23 13:35:50
音频设备类型
Index
Enum
* QNAudioDevice
Enum
QNAudioDevice
* code | describe | message
---|---|---
SPEAKER_PHONE | 扬声器 | 无
EARPIECE | 听筒 | 无
WIRED_HEADSET | 有线耳机 | 无
BLUETOOTH | 蓝牙 | 无
NONE | 无音频设备 | 无
Type declaration
* SPEAKER_PHONE
* EARPIECE
* WIRED_HEADSET
* BLUETOOTH
* NONE
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNAudioDevice
# QNAudioDevice
最近更新时间: 2022-03-23 13:35:50
音频设备类型
Index
Enum
* QNAudioDevice
Enum
QNAudioDevice
* code | describe | message
---|---|---
SPEAKER_PHONE | 扬声器 | 无
EARPIECE | 听筒 | 无
WIRED_HEADSET | 有线耳机 | 无
BLUETOOTH | 蓝牙 | 无
NONE | 无音频设备 | 无
Type declaration
* SPEAKER_PHONE
* EARPIECE
* WIRED_HEADSET
* BLUETOOTH
* NONE
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,839 |
QNAudioFrameListener | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNAudioFrameListener
# QNAudioFrameListener
最近更新时间: 2022-03-21 20:52:34
音频数据回调接口
Index
Core Methods
* OnAudioFrame
Core Methods
OnAudioFrame
* virtual void OnAudioFrame(const string& user_id,const string& track_id,const uint8_t* data, uint32_t data_size,uint32_t bits_per_sample, uint32_t sample_rate,uint32_t channels) = 0
* 音频数据回调
Parameters
* user_id: string
此音频数据所属的用户
* track_id: string
此音频 track id
* data: uint8_t*
音频数据内存指针
* data_size: uint32_t
数据长度
* bits_per_sample: uint32_t
位宽,即每个采样点占用位数
* sample_rate: uint32_t
采样率
* channels: uint32_t
声道数
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNAudioFrameListener
# QNAudioFrameListener
最近更新时间: 2022-03-21 20:52:34
音频数据回调接口
Index
Core Methods
* OnAudioFrame
Core Methods
OnAudioFrame
* virtual void OnAudioFrame(const string& user_id,const string& track_id,const uint8_t* data, uint32_t data_size,uint32_t bits_per_sample, uint32_t sample_rate,uint32_t channels) = 0
* 音频数据回调
Parameters
* user_id: string
此音频数据所属的用户
* track_id: string
此音频 track id
* data: uint8_t*
音频数据内存指针
* data_size: uint32_t
数据长度
* bits_per_sample: uint32_t
位宽,即每个采样点占用位数
* sample_rate: uint32_t
采样率
* channels: uint32_t
声道数
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,840 |
QNCameraVideoTrackConfig | 实时音视频 | [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNCameraVideoTrackConfig
# QNCameraVideoTrackConfig
最近更新时间: 2022-03-28 23:36:23
摄像头视频采集 Track 的配置
Index
Properties
* encoder_config
* capture_config
* id
* tag
* multi_profile_enabled
* camera_facing
Properties
encoder_config
* encoder_config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/11201/QNCameraVideoTrackConfig-Linux/11225/QNVideoEncoderConfig-Linux)
* 设置摄像头采集数据编码参数
capture_config
* capture_config: [QNVideoCaptureConfig](https://developer.qiniu.com/rtc/11201/QNCameraVideoTrackConfig-Linux/undefined)
* 设置摄像头采集参数
id
* id: string
* 设备 id
tag
* tag: string
* 自定义标签
multi_profile_enabled
* multi_profile_enabled: bool
* 是否开启多流
camera_facing
* camera_facing: [QNCameraFacing](https://developer.qiniu.com/rtc/11201/QNCameraVideoTrackConfig-Linux/11259/QNCameraFacing-Linux)
* 设置前后置摄像头(仅适用于 Android 和 iOS)
以上内容是否对您有帮助?
| * __
* __
* __
* __
* __
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux
>QNCameraVideoTrackConfig
# QNCameraVideoTrackConfig
最近更新时间: 2022-03-28 23:36:23
摄像头视频采集 Track 的配置
Index
Properties
* encoder_config
* capture_config
* id
* tag
* multi_profile_enabled
* camera_facing
Properties
encoder_config
* encoder_config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/11201/QNCameraVideoTrackConfig-Linux/11225/QNVideoEncoderConfig-Linux)
* 设置摄像头采集数据编码参数
capture_config
* capture_config: [QNVideoCaptureConfig](https://developer.qiniu.com/rtc/11201/QNCameraVideoTrackConfig-Linux/undefined)
* 设置摄像头采集参数
id
* id: string
* 设备 id
tag
* tag: string
* 自定义标签
multi_profile_enabled
* multi_profile_enabled: bool
* 是否开启多流
camera_facing
* camera_facing: [QNCameraFacing](https://developer.qiniu.com/rtc/11201/QNCameraVideoTrackConfig-Linux/11259/QNCameraFacing-Linux)
* 设置前后置摄像头(仅适用于 Android 和 iOS)
以上内容是否对您有帮助?
* __
* __
* __
* __
* __
文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category))
提交
| 6,842 |
Subsets and Splits