jancd/qiniu-developer_ShareGPT huggingface dataset:
human: 如何处理七牛云的实时音视频QNMediaRecorderConfig

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNMediaRecorderConfig

#  QNMediaRecorderConfig

最近更新时间: 2024-06-28 16:41:23

用来配置 QNMediaRecorder 的相关信息

Index

Core Properties

  * filePath
  * localAudioTrack
  * localVideoTrack

Core methods

  * initWithFilePath

Core Properties

filePath

  * @property (nonatomic, copy, readonly) NSString * _Nullable filePath;
  * 请确保路径完整精确到文件名和类型，存在有效且可读可写

支持 aac、wav、mp4

localAudioTrack

  * @property (nonatomic, strong, readonly) [QNLocalAudioTrack](https://developer.qiniu.com/rtc/12687/QNMediaRecorderConfig-iOS/8854/QNLocalAudioTrack-iOS) *localAudioTrack;
  * 本地音频，支持麦克风或自定义音频

仅支持一路音频轨的设置，重复设置会被覆盖

localVideoTrack

  * @property (nonatomic, strong, readonly) [QNLocalVideoTrack](https://developer.qiniu.com/rtc/12687/QNMediaRecorderConfig-iOS/8849/QNLocalVideoTrack-iOS) *localVideoTrack;
  * 本地视频，支持摄像头或自定义视频

仅支持一路视频轨的设置，重复设置会被覆盖

Core methods

initWithFilePath

  * \- (instancetype)initWithFilePath:(NSString *_Nullable)filePath localAudioTrack:([QNLocalAudioTrack](https://developer.qiniu.com/rtc/12687/QNMediaRecorderConfig-iOS/8854/QNLocalAudioTrack-iOS) *_Nullable)localAudioTrack localVideoTrack:([QNLocalVideoTrack](https://developer.qiniu.com/rtc/12687/QNMediaRecorderConfig-iOS/8849/QNLocalVideoTrack-iOS) *_Nullable)localVideoTrack;
  * 初始化指定文件路径、本地音频录制 Track

> 注意：文件路径，传空默认存储在 App Container/Library/Caches/Pili/RecordFile

Parameters

    * filePath: NSString 

文件路径

    * localAudioTrack: [QNLocalAudioTrack](https://developer.qiniu.com/rtc/12687/QNMediaRecorderConfig-iOS/8854/QNLocalAudioTrack-iOS)

本地音频 Track

    * localVideoTrack: [QNLocalVideoTrack](https://developer.qiniu.com/rtc/12687/QNMediaRecorderConfig-iOS/8849/QNLocalVideoTrack-iOS)

本地视频 Track

Returns
[QNMediaRecorderConfig](https://developer.qiniu.com/rtc/12687/QNMediaRecorderConfig-
iOS/undefined)

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNScreenVideoTrackConfig

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS
>QNScreenVideoTrackConfig

#  QNScreenVideoTrackConfig

最近更新时间: 2022-06-30 16:30:38

屏幕录制 Track 的配置类

Index

Core Properties

  * tag
  * config
  * multiStreamEnable

Core Methods

  * defaultScreenVideoTrackConfig
  * initWithSourceTag[1/3]
  * initWithSourceTag[2/3]
  * initWithSourceTag[3/3]

Core Properties

tag

  * @property (nonatomic, strong) NSString * tag;
  * Track 的 tag，SDK 会将其透传到远端，当发布多路 Track 时可用 tag 来作区分。

config

  * @property (nonatomic, strong, readonly) [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) *config;
  * Track 的视频编码配置

multiStreamEnable

  * @property (nonatomic, assign) BOOL multiStreamEnable;
  * Track 是否开启大小流

关于大小流功能，可参考[视频大小流使用指南](https://developer.qiniu.com/rtc/development_guidelines/9259/multi-
stream-iOS)

Core Methods

defaultScreenVideoTrackConfig

  * \+ (instancetype)defaultScreenVideoTrackConfig;
  * 初始化默认 Track 配置，tag 为""

Returns
[QNScreenVideoTrackConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig-
iOS/8845/QNScreenVideoTrackConfig-iOS)

initWithSourceTag[1/3]

  * \- (instancetype)initWithSourceTag:(nullable NSString *)tag;
  * 初始化指定 tag 参数的 Track 配置

Parameters

    * tag: NSString 

Track 的标签，可通过它来携带 Track 信息，区分 Track 对象

Returns
[QNScreenVideoTrackConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig-
iOS/8845/QNScreenVideoTrackConfig-iOS)

initWithSourceTag[2/3]

  * \- (instancetype)initWithSourceTag:(nullable NSString *)tag config:([QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) *)config
  * 初始化指定 tag、config 参数的 Track 配置

Parameters

    * tag: NSString 

Track 的标签，可通过它来携带 Track 信息，区分 Track 对象

    * config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS)

Track 的视频编码配置

Returns
[QNScreenVideoTrackConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig-
iOS/8845/QNScreenVideoTrackConfig-iOS)

initWithSourceTag[3/3]

  * \- (instancetype)initWithSourceTag:(nullable NSString *)tag config:([QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) *)config multiStreamEnable:(BOOL)multiStreamEnable;
  * 初始化指定 tag、config、multiStreamEnable 参数的 Track 配置

Parameters

    * tag: NSString 

Track 的 tag

    * config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS)

Track 的视频编码配置

    * multiStreamEnable: BOOL 

是否允许多路流

Returns
[QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig-
iOS/undefined)

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNMicrophoneAudioTrackConfig

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS
>QNMicrophoneAudioTrackConfig

#  QNMicrophoneAudioTrackConfig

最近更新时间: 2022-06-30 15:38:21

麦克风音频 Track 配置类

Index

Core Properties

  * tag
  * audioQuality

Core Methods

  * defaultMicrophoneAudioTrackConfig
  * initWithTag[1/2]
  * initWithTag[2/2]

Core Properties

tag

  * @property (nonatomic, strong) NSString * tag;
  * Track 的 tag，SDK 会将其透传到远端，当发布多路 Track 时可用 tag 来作区分

audioQuality

  * @property (nonatomic, strong, readonly) [QNAudioQuality](https://developer.qiniu.com/rtc/8837/QNMicrophoneAudioTrackConfig-iOS/11936/QNAudioQuality-iOS) *audioQuality;
  * Track 的音频编码配置

Core Methods

defaultMicrophoneAudioTrackConfig

  * \+ (instancetype)defaultMicrophoneAudioTrackConfig;
  * 初始化默认 Track 配置，tag 为 ""、默认码率为 64kbps

Returns
[QNMicrophoneAudioTrackConfig](https://developer.qiniu.com/rtc/8837/QNMicrophoneAudioTrackConfig-
iOS/8837/QNMicrophoneAudioTrackConfig-iOS)

initWithTag[1/2]

  * \- (instancetype)initWithTag:(NSString *)tag;
  * 初始化指定 tag 参数的 Track，默认码率为 64kbps

Parameters

    * tag: NSString 

Track 的 tag

Returns
[QNMicrophoneAudioTrackConfig](https://developer.qiniu.com/rtc/8837/QNMicrophoneAudioTrackConfig-
iOS/8837/QNMicrophoneAudioTrackConfig-iOS)

initWithTag[2/2]

  * \- (instancetype)initWithTag:(NSString *)tag audioQuality:([QNAudioQuality](https://developer.qiniu.com/rtc/8837/QNMicrophoneAudioTrackConfig-iOS/11936/QNAudioQuality-iOS) *)audioQuality;
  * 初始化指定 tag、[QNAudioQuality](https://developer.qiniu.com/rtc/8837/QNMicrophoneAudioTrackConfig-iOS/11936/QNAudioQuality-iOS) 参数的 Track 配置

其中，码率由
[QNAudioQuality](https://developer.qiniu.com/rtc/8837/QNMicrophoneAudioTrackConfig-
iOS/11936/QNAudioQuality-iOS) 配置决定

Parameters

    * tag: NSString 

Track 的 tag

    * audioQuality: [QNAudioQuality](https://developer.qiniu.com/rtc/8837/QNMicrophoneAudioTrackConfig-iOS/11936/QNAudioQuality-iOS)

Track 的音频编码配置

Returns
[QNMicrophoneAudioTrackConfig](https://developer.qiniu.com/rtc/8837/QNMicrophoneAudioTrackConfig-
iOS/8837/QNMicrophoneAudioTrackConfig-iOS)

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNCustomAudioTrackConfig

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS
>QNCustomAudioTrackConfig

#  QNCustomAudioTrackConfig

最近更新时间: 2022-06-30 15:13:11

自定义音频 Track 配置类

Index

Core Properties

  * tag
  * audioQuality

Core Methods

  * defaultCustomAudioTrackConfig
  * initWithTag[1/2]
  * initWithTag[2/2]

Core Properties

tag

  * @property (nonatomic, strong) NSString * tag;
  * Track 的 tag，SDK 会将其透传到远端，当发布多路 Track 时可用 tag 来作区分

audioQuality

  * @property (nonatomic, strong, readonly) [QNAudioQuality](https://developer.qiniu.com/rtc/8843/QNCustomAudioTrackConfig-iOS/11936/QNAudioQuality-iOS) *audioQuality;
  * Track 的音频编码配置

Core Methods

defaultCustomAudioTrackConfig

  * \+ (instancetype)defaultCustomAudioTrackConfig;
  * 初始化默认 Track 配置，tag 为 ""、默认码率为 64kbps

Returns
[QNCustomAudioTrackConfig](https://developer.qiniu.com/rtc/8843/QNCustomAudioTrackConfig-
iOS/8843/QNCustomAudioTrackConfig-iOS)

initWithTag[1/2]

  * \- (instancetype)initWithTag:(NSString *)tag;
  * 初始化指定 tag 参数的 Track 配置，默认码率为 64kbps

Parameters

    * tag: NSString 

Track 的 tag

Returns
[QNCustomAudioTrackConfig](https://developer.qiniu.com/rtc/8843/QNCustomAudioTrackConfig-
iOS/8843/QNCustomAudioTrackConfig-iOS)

initWithTag[2/2]

  * \- (instancetype)initWithTag:(NSString *)tag audioQuality:([QNAudioQuality](https://developer.qiniu.com/rtc/8843/QNCustomAudioTrackConfig-iOS/11936/QNAudioQuality-iOS) *)audioQuality;
  * 初始化指定 tag、audioQuality 参数的 Track 配置

其中，码率由
[QNAudioQuality](https://developer.qiniu.com/rtc/8843/QNCustomAudioTrackConfig-
iOS/11936/QNAudioQuality-iOS) 配置决定

Parameters

    * tag: NSString 

Track 的 tag

    * audioQuality: [QNAudioQuality](https://developer.qiniu.com/rtc/8843/QNCustomAudioTrackConfig-iOS/11936/QNAudioQuality-iOS)

Track 的音频编码配置

Returns
[QNCustomAudioTrackConfig](https://developer.qiniu.com/rtc/8843/QNCustomAudioTrackConfig-
iOS/8843/QNCustomAudioTrackConfig-iOS)

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNRTCDelegate

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRTCDelegate

#  QNRTCDelegate

最近更新时间: 2022-06-30 16:17:25

QNRTC 回调代理

Index

Core Methods

  * RTCDidAudioRouteChanged

Core Methods

RTCDidAudioRouteChanged

  * \- (void)RTCDidAudioRouteChanged:([QNAudioDeviceType](https://developer.qiniu.com/rtc/9551/QNRTCDelegate/9254))deviceType;
  * 音频输出设备变更的回调

Parameters

    * deviceType: [QNAudioDeviceType](https://developer.qiniu.com/rtc/9551/QNRTCDelegate/9254)

音频输出设备

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNCDNStreamingDelegate

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS
>QNCDNStreamingDelegate

#  QNCDNStreamingDelegate

最近更新时间: 2024-01-12 15:33:46

推流状态和统计信息回调，可通过
[QNCDNStreamingClient.delegate](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/undefined)
设置。

Index

Core Methods

  * didCDNStreamingConnectionStateChanged
  * didCDNStreamingStats

Core Methods

didCDNStreamingConnectionStateChanged

  * \- (void)cdnStreamingClient:([QNCDNStreamingClient](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/12634/QNCDNStreamingClient-iOS) *)client didCDNStreamingConnectionStateChanged:([QNConnectionState](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/9254))state errorCode:(int)code message:(NSString *)message;
  * 推流状态的回调

Parameters

    * client: [QNCDNStreamingClient](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/12634/QNCDNStreamingClient-iOS)

推流实例对象

    * state: [QNConnectionState](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/9254)

连接状态

    * code: int 

错误码

    * message: NSString 

错误信息

didCDNStreamingStats

  * \- (void)cdnStreamingClient:([QNCDNStreamingClient](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/12634/QNCDNStreamingClient-iOS) *)client didCDNStreamingStats:([QNCDNStreamingStats](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/12637/QNCDNStreamingStats-iOS) *)stats;
  * 推流统计信息回调

Parameters

    * client: [QNCDNStreamingClient](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/12634/QNCDNStreamingClient-iOS)

推流实例对象

    * stats: [QNCDNStreamingStats](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/12637/QNCDNStreamingStats-iOS)

统计信息

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNMediaRecorderDelegate

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS
>QNMediaRecorderDelegate

#  QNMediaRecorderDelegate

最近更新时间: 2024-06-28 16:41:15

QNRTC 回调代理

Index

Core Methods

  * infoDidUpdated
  * stateDidChanged

Core Methods

infoDidUpdated

  * \- (void)mediaRecorder:([QNMediaRecorder](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/12685/QNMediaRecorder-iOS)* _Nonnull)recorder infoDidUpdated:([QNMediaRecordInfo](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/12686/QNMediaRecordInfo-iOS)* _Nonnull)info;
  * 录制信息更新回调

Parameters

    * recorder: [QNMediaRecorder](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/12685/QNMediaRecorder-iOS)

媒体录制实例

    * info: [QNMediaRecordInfo](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/12686/QNMediaRecordInfo-iOS)

媒体录制完成的信息

stateDidChanged

  * \- (void)mediaRecorder:([QNMediaRecorder](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/12685/QNMediaRecorder-iOS)* _Nonnull)recorder stateDidChanged:([QNMediaRecorderState](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/9254))state reason:([QNMediaRecorderReasonCode](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/9254))reason;
  * 录制状态发生变化回调

Parameters

    * recorder: [QNMediaRecorder](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/12685/QNMediaRecorder-iOS)

媒体录制实例

    * state: [QNMediaRecorderState](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/9254)

录制状态

    * reason: [QNMediaRecorderReasonCode](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/9254)

录制错误信息

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNAudioDecryptDelegate

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS
>QNAudioDecryptDelegate

#  QNAudioDecryptDelegate

最近更新时间: 2024-01-18 16:09:33

远端音频 Track 解密回调代理，可通过
[QNRemoteAudioTrack.decryptDelegate](https://developer.qiniu.com/rtc/12617/qnaudiodecryptdelegate/8859)
进行设置，用来实现远端音频 Track 数据解密的回调。

Index

Core Methods

  * onGetExtraData
  * onSetMaxDecryptSize
  * onDecrypt

Core Methods

onGetExtraData

  * \- (void)remoteAudioTrack:([QNRemoteAudioTrack](https://developer.qiniu.com/rtc/12617/qnaudiodecryptdelegate/8859/QNRemoteAudioTrack-iOS) *)remoteAudioTrack onGetExtraData:(uint8_t *)extraData dataSize:(int)dataSize;
  * 远端音频 Track 扩展数据回调

Parameters

    * remoteAudioTrack: [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/12617/qnaudiodecryptdelegate/8859/QNRemoteAudioTrack-iOS)

远端音频 Track

    * extraData: uint8_t 

音频扩展数据

    * dataSize: int 

扩展数据大小

onSetMaxDecryptSize

  * \- (int)remoteAudioTrack:([QNRemoteAudioTrack](https://developer.qiniu.com/rtc/12617/qnaudiodecryptdelegate/8859/QNRemoteAudioTrack-iOS) *)remoteAudioTrack onSetMaxDecryptSize:(int)frameSize;
  * 设置解密后的最大字节数

> 注意配合 onDecrypt 使用
>
> 注意返回 frameSize，没有任何处理则返回 0

Parameters

    * remoteAudioTrack: [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/12617/qnaudiodecryptdelegate/8859/QNRemoteAudioTrack-iOS)

远端音频 Track

    * frameSize: int 

数据大小

Returns 最大字节数

onDecrypt

  * \- (int)remoteAudioTrack:([QNRemoteAudioTrack](https://developer.qiniu.com/rtc/12617/qnaudiodecryptdelegate/8859/QNRemoteAudioTrack-iOS) *)remoteAudioTrack onDecrypt:(uint8_t *)frame frameSize:(int)frameSize decryptedFrame:(uint8_t *)decryptedFrame;
  * 解密回调接口

Parameters

    * remoteAudioTrack: [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/12617/qnaudiodecryptdelegate/8859/QNRemoteAudioTrack-iOS)

远端音频 Track

    * frame: uint8_t * 

解密前的数据

    * frameSize: int 

解密前的数据大小

    * decryptedFrame: uint8_t * 

解密后的数据

Returns 解密后的数据大小

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNAudioEncryptDelegate

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS
>QNAudioEncryptDelegate

#  QNAudioEncryptDelegate

最近更新时间: 2024-01-18 16:10:15

本地音频 Track 加密回调代理，可通过
[QNLocalAudioTrack.encryptDelegate](https://developer.qiniu.com/rtc/12618/qnaudioencryptdelegate/8854)
进行设置，本地音频 Track 加密的回调。

Index

Core Methods

  * onGetExtraData
  * onSetMaxEncryptSize
  * onEncrypt

Core Methods

onGetExtraData

  * \- (int)localAudioTrack:([QNLocalAudioTrack](https://developer.qiniu.com/rtc/12618/qnaudioencryptdelegate/8854/QNLocalAudioTrack-iOS) *)localAudioTrack onPutExtraData:(uint8_t *)extraData maxSize:(int)maxSize;
  * 远端音频 Track 扩展数据回调

Parameters

    * localAudioTrack: [QNLocalAudioTrack](https://developer.qiniu.com/rtc/12618/qnaudioencryptdelegate/8854/QNLocalAudioTrack-iOS)

远端音频 Track

    * extraData: uint8_t 

音频扩展数据

    * maxSize: int 

扩展数据大小

onSetMaxEncryptSize

  * \- (int)localAudioTrack:(QNLocalAudioTrack *)localAudioTrack onSetMaxEncryptSize:(int)frameSize;
  * 设置加密后的最大字节数

> 注意配合 onEncrypt 使用
>
> 注意不超过 1000 字节，若存在 extra data 则除了加上 extra data 大小外，还需额外添加 6 个字节的 SDK
> 内置标识分割符大小，没有任何处理则返回 0

Parameters

    * localAudioTrack: [QNLocalAudioTrack](https://developer.qiniu.com/rtc/12618/qnaudioencryptdelegate/8854/QNLocalAudioTrack-iOS)

远端音频 Track

    * frameSize: int 

数据大小

Returns 返回音频处理后的总字节数，包括加密的数据以及自定义数据；若添加自定义数据，则需额外增加 6 个字节的内置标识分隔符大小

onEncrypt

  * \- (int)localAudioTrack:(QNLocalAudioTrack *)localAudioTrack onEncrypt:(uint8_t *)frame frameSize:(int)frameSize encryptedFrame:(uint8_t *)encryptedFrame;
  * 加密回调接口

Parameters

    * localAudioTrack: [QNLocalAudioTrack](https://developer.qiniu.com/rtc/12618/qnaudioencryptdelegate/8854/QNLocalAudioTrack-iOS)

远端音频 Track

    * frame: uint8_t * 

加密前的数据

    * frameSize: int 

加密前的数据大小

    * encryptedFrame: uint8_t * 

加密后的数据

Returns 加密后的数据大小

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNMicrophoneAudioTrackDelegate

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS
>QNMicrophoneAudioTrackDelegate

#  QNMicrophoneAudioTrackDelegate

最近更新时间: 2023-11-20 10:26:35

麦克风 Track 回调代理，可通过
[QNMicrophoneAudioTrack.microphoneDelegate](https://developer.qiniu.com/rtc/12582/QNMicrophoneAudioTrackDelegate/8855)
进行设置。

Index

Core Methods

  * didFailWithError

Core Methods

didFailWithError

  * \- (void)microphoneAudioTrack:([QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/12582/QNMicrophoneAudioTrackDelegate/8855/QNMicrophoneAudioTrack-iOS) *)microphoneAudioTrack didFailWithError:(NSError *)error;
  * 远端音频 Track 的数据回调

Parameters

    * microphoneAudioTrack: [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/12582/QNMicrophoneAudioTrackDelegate/8855/QNMicrophoneAudioTrack-iOS)

远端音频 Track

    * error: NSError 

错误信息

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNLocalAudioTrackDelegate

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS
>QNLocalAudioTrackDelegate

#  QNLocalAudioTrackDelegate

最近更新时间: 2022-06-30 15:24:30

本地音频 Track 回调代理，可通过
[QNLocalAudioTrack.delegate](https://developer.qiniu.com/rtc/11969/QNLocalAudioTrackDelegate/8854)
进行设置，本地音频 Track 视频数据的回调。

Index

Core Methods

  * didGetAudioBuffer

Core Methods

didGetAudioBuffer

  * \- (void)localAudioTrack:([QNLocalAudioTrack](https://developer.qiniu.com/rtc/11969/QNLocalAudioTrackDelegate/8854/QNLocalAudioTrack-iOS) *)localAudioTrack didGetAudioBuffer:(AudioBuffer *)audioBuffer bitsPerSample:(NSUInteger)bitsPerSample sampleRate:(NSUInteger)sampleRate;
  * 本地音频 Track 的数据回调

> 该回调在 AU Remote IO 线程，请不要做过于耗时的操作，否则可能阻塞该线程影响音频输出或其他未知问题。

Parameters

    * localAudioTrack: [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11969/QNLocalAudioTrackDelegate/8854/QNLocalAudioTrack-iOS)

本地音频 Track

    * audioBuffer: AudioBuffer 

音频数据

    * bitsPerSample: NSUInteger 

音频数据位宽

    * sampleRate: NSUInteger 

音频数据采样率

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNLocalVideoTrackDelegate

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS
>QNLocalVideoTrackDelegate

#  QNLocalVideoTrackDelegate

最近更新时间: 2022-06-30 15:28:49

本地视频 Track 回调代理，可通过
[QNLocalVideoTrack.delegate](https://developer.qiniu.com/rtc/11970/QNLocalVideoTrackDelegate/8849)
进行设置，本地视频 Track 视频数据的回调。

Index

Core Methods

  * didGetPixelBuffer

Core Methods

didGetPixelBuffer

  * \- (void)localVideoTrack:([QNLocalVideoTrack](https://developer.qiniu.com/rtc/11970/QNLocalVideoTrackDelegate/8849/QNLocalVideoTrack-iOS) *)localVideoTrack didGetPixelBuffer:(CVPixelBufferRef)pixelBuffer;
  * 本地视频 Track 的数据回调

> 该回调在视频数据的输出线程，请不要做过于耗时的操作，否则可能会导致编码帧率下降。

Parameters

    * localVideoTrack: [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11970/QNLocalVideoTrackDelegate/8849/QNLocalVideoTrack-iOS)

本地视频 Track

    * pixelBuffer: CVPixelBufferRef 

具体的视频数据格式，可通过 CVPixelBufferGetPixelFormatType 获取

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNCameraVideoTrackDelegate

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS
>QNCameraVideoTrackDelegate

#  QNCameraVideoTrackDelegate

最近更新时间: 2023-07-07 21:16:16

摄像头采集 Track 回调代理，可通过
[QNCameraVideoTrack.cameraDelegate](https://developer.qiniu.com/rtc/12438/QNCameraVideoTrackDelegate/8852)
进行设置，摄像头采集 Track 内部处理发生错误时的回调。

Index

Core Methods

  * didFailWithError

Core Methods

didFailWithError

  * \- (void)cameraVideoTrack:(QNCameraVideoTrack *)cameraVideoTrack didFailWithError:(NSError *)error;
  * 摄像头采集 Track 运行过程中发生错误的回调

Parameters

    * cameraVideoTrack: [QNCameraVideoTrack](https://developer.qiniu.com/rtc/12438/QNCameraVideoTrackDelegate/8852/QNCameraVideoTrack-iOS)

摄像头采集 Track

    * error: NSError 

错误信息

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNCustomAudioTrackDelegate

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS
>QNCustomAudioTrackDelegate

#  QNCustomAudioTrackDelegate

最近更新时间: 2022-06-30 15:14:13

自定义音频 Track 回调代理，可通过
[QNCustomAudioTrack.customAudioDelegate](https://developer.qiniu.com/rtc/11946/QNCustomAudioTrackDelegate/8856)
进行设置，自定义音频 Track 内部处理发生错误时的回调。

Index

Core Methods

  * didFailWithError

Core Methods

didFailWithError

  * \- (void)customAudioTrack:([QNCustomAudioTrack](https://developer.qiniu.com/rtc/11946/QNCustomAudioTrackDelegate/8856/QNCustomAudioTrack-iOS) *)customAudioTrack didFailWithError:(NSError *)error;
  * 本地音频 Track 的数据回调

Parameters

    * customAudioTrack: [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11946/QNCustomAudioTrackDelegate/8856/QNCustomAudioTrack-iOS)

自定义音频 Track

    * error: NSError 

错误信息

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNRemoteAudioTrackDelegate

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS
>QNRemoteAudioTrackDelegate

#  QNRemoteAudioTrackDelegate

最近更新时间: 2022-06-30 15:41:07

远端音频 Track 回调代理，可通过
[QNRemoteAudioTrack.delegate](https://developer.qiniu.com/rtc/11948/QNRemoteAudioTrackDelegate/8859)
进行设置，用来实现远端音频 Track 数据及开关静默的回调。

Index

Core Methods

  * didGetAudioBuffer
  * didMuteStateChanged

Core Methods

didGetAudioBuffer

  * \- (void)remoteAudioTrack:([QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11948/QNRemoteAudioTrackDelegate/8859/QNRemoteAudioTrack-iOS) *)remoteAudioTrack didGetAudioBuffer:(AudioBuffer *)audioBuffer bitsPerSample:(NSUInteger)bitsPerSample sampleRate:(NSUInteger)sampleRate;
  * 远端音频 Track 的数据回调

Parameters

    * remoteAudioTrack: [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11948/QNRemoteAudioTrackDelegate/8859/QNRemoteAudioTrack-iOS)

远端音频 Track

    * audioBuffer: AudioBuffer 

音频数据

    * bitsPerSample: NSUInteger 

音频数据位数

    * sampleRate: NSUInteger 

音频采样率

didMuteStateChanged

  * \- (void)remoteAudioTrack:([QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11948/QNRemoteAudioTrackDelegate/8859/QNRemoteAudioTrack-iOS) *)remoteAudioTrack didMuteStateChanged:(BOOL)isMuted;
  * 远端音频 Track 静默的回调

Parameters

    * remoteAudioTrack: [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11948/QNRemoteAudioTrackDelegate/8859/QNRemoteAudioTrack-iOS)

远端音频 Track

    * isMuted: BOOL 

是否静默

以上内容是否对您有帮助？