AOQ Client SDK iOS API reference, covering engine lifecycle, audio/video device management, codec configuration, media stream control, audio file playback, external audio streams, real-time messaging, frame callbacks, delegate protocols, and data types and enumerations.
API index
Engine lifecycle
| API | Description |
|---|---|
| createEngine | Create an engine instance (singleton) |
| destroy | Destroy the engine instance |
| getVersion | Get the SDK version |
| connect | Connect to the Relay server |
| disconnect | Disconnect from the server |
Audio device management
| API | Description |
|---|---|
| startAudioCapture | Open the audio capture device (microphone) |
| stopAudioCapture | Close the audio capture device |
| muteAudioCapture | Mute or unmute audio capture |
| startAudioPlayer | Start audio rendering (remote audio playback) |
| stopAudioPlayer | Stop audio rendering |
| pauseAudioPlayer | Pause audio rendering, with optional fade-out |
| resumeAudioPlayer | Resume audio rendering, with optional fade-in |
| interruptAudioPlayer | Interrupt the current audio session |
| enableSpeakerphone | Switch audio output between the speaker and earpiece |
| isSpeakerphoneEnabled | Check whether audio output uses the speaker |
| setAudioSessionRestriction | Set AVAudioSession control permissions (iOS only) |
Audio encoding configuration
| API | Description |
|---|---|
| setAudioEncoderConfig | Set audio encoding parameters |
| setAudioDecoderConfig | Set audio decoding parameters |
Audio file playback
| API | Description |
|---|---|
| startAudioFile | Start playing and publishing a local audio file |
| stopAudioFile | Stop audio file playback |
| pauseAudioFile | Pause audio file playback |
| resumeAudioFile | Resume audio file playback |
| getAudioFileDuration | Get the total duration of the audio file |
| getAudioFileCurrentPosition | Get the current playback position of the audio file |
| setAudioFilePositionMillis | Seek to a position in the audio file |
| setAudioFileVolume | Set the audio file volume |
| getAudioFileVolume | Get the current audio file volume |
External audio streams
| API | Description |
|---|---|
| addAudioExternalStream | Add an external audio stream |
| pushAudioExternalStreamData | Push external PCM audio data |
| setAudioExternalStreamVolume | Set the external audio stream volume |
| getAudioExternalStreamVolume | Get the external audio stream volume |
| clearAudioExternalStreamBuffer | Clear the external audio stream buffer |
| removeAudioExternalStream | Remove an external audio stream |
Audio frame callbacks
| API | Description |
|---|---|
| setAudioFrameObserver | Set the audio frame callback delegate |
| enableAudioFrameObserver | Enable or disable audio frame callbacks at a specified stage |
Local audio volume indication
| API | Description |
|---|---|
| enableLocalAudioVolumeIndication | Enable or disable local capture volume indication |
Video device management
| API | Description |
|---|---|
| startVideoCapture | Open the video capture device (camera) |
| stopVideoCapture | Close the video capture device |
| switchCamera | Switch between front and rear cameras |
| setLocalView | Set or remove the local video rendering window |
| setRemoteView | Set or remove the remote video rendering window |
Video encoding and external input
| API | Description |
|---|---|
| setVideoEncoderConfig | Set video encoding parameters |
| setVideoDecoderConfig | Set video decoding parameters |
| pushExternalVideoCapturedFrame | Push externally captured video frames |
| pushExternalVideoEncodedFrame | Push externally encoded video frames |
Screen capture
| API | Description |
|---|---|
| startScreenCapture | Start screen capture (Broadcast Upload Extension) |
| stopScreenCapture | Stop screen capture |
Media stream transmission control
| API | Description |
|---|---|
| enableSendMediaStream | Enable or disable local media stream transmission |
Video frame callbacks
| API | Description |
|---|---|
| setVideoFrameObserver | Set the video frame callback delegate |
| enableVideoFrameObserver | Enable or disable video frame callbacks at a specified stage |
Real-time messages
| API | Description |
|---|---|
| sendDataMsg | Send a real-time data message |
AoqEngineDelegate callbacks
| API | Description |
|---|---|
| onError | Engine error callback |
| onWarning | Engine warning callback |
| onConnectionStatusChange | Connection status change callback |
| onStats | Engine statistics callback |
| onAudioDeviceStateChanged | Audio device operation status change callback |
| onAudioDeviceRouteChanged | Audio output route change callback |
| onAudioDeviceInterrupted | Audio device interruption callback |
| onAudioFileState | Audio file playback status callback |
| onLocalAudioVolumeIndication | Local capture volume indication callback |
| onVideoDeviceStateChanged | Video device operation status change callback |
| onDataMsg | Received real-time data message callback |
| onScreenCaptureStateChanged | Screen capture status change callback (@optional) |
AoqAudioFrameDelegate callbacks
| API | Description |
|---|---|
| onCapturedAudioFrame | Called when a raw audio frame is captured. The frame contains unprocessed PCM data. |
| onProcessCapturedAudioFrame | Called for an audio frame after 3A processing, such as echo cancellation and noise suppression. |
| onPublishAudioFrame | Called for an audio frame before publishing, immediately before encoding and transmission. |
| onPlaybackAudioFrame | Called for a remote audio frame before playback, after decoding and mixing. |
AoqVideoFrameDelegate callbacks
| API | Description |
|---|---|
| onCapturedVideoFrame | Called when a raw video frame is captured, before preprocessing. |
| onPreEncodeVideoFrame | Called for a video frame after preprocessing and before encoding. |
| onRemoteVideoFrame | Called for a remote video frame after decoding and before rendering. |
API details
Engine lifecycle
createEngine:delegate:
Creates the engine instance. The SDK holds a global singleton; repeated calls return the existing instance.
| Parameter | Type | Description |
|---|---|---|
| config | AoqCreateConfig * | Engine creation configuration |
| delegate | id<AoqEngineDelegate> | Engine event delegate |
destroy
Destroys the engine instance and releases all resources. Call createEngine: again before using the SDK after destruction.
getVersion
Gets the current SDK version. Can be called before createEngine:.
connect:
Connects to the Relay server. The application's AppServer allocates connection parameters through /api/v1/allocate and sends them to the client. This method returns immediately. The connection result is reported through onConnectionStatusChange:.
| Parameter | Type | Description |
|---|---|---|
| config | AoqConnectConfig * | Connection configuration, including Token, SID, Relay endpoints, and publishing/subscription tracks |
disconnect
Disconnects from the server and releases connection resources. Returns immediately. The disconnection result is reported through onConnectionStatusChange:.
Audio device management
startAudioCapture:
Opens the audio capture device (microphone) and starts capturing local audio. For external audio input (pushAudioExternalStreamData:data:), set isExternal to YES. In this mode, the microphone is not opened.
| Parameter | Type | Description |
|---|---|---|
| config | AoqAudioCaptureConfig * | Audio capture configuration |
stopAudioCapture
Closes the audio capture device and stops local audio capture.
muteAudioCapture:
Mutes or unmutes audio capture. Unlike stopAudioCapture, muting keeps capture running but sends silent frames.
| Parameter | Type | Description |
|---|---|---|
| mute | BOOL | YES mutes capture; NO unmutes it. |
startAudioPlayer:
Starts audio rendering and plays remote audio through the speaker or earpiece. For external rendering (playing PCM yourself), set isExternal to YES.
| Parameter | Type | Description |
|---|---|---|
| config | AoqAudioPlaybackConfig * | Audio playback configuration |
stopAudioPlayer
Stops audio rendering and closes the playback device.
pauseAudioPlayer:
Pauses audio rendering with optional fade-out. Remote audio data continues to arrive while paused but is not played.
| Parameter | Type | Description |
|---|---|---|
| fadeMs | NSInteger | Fade-out duration in milliseconds. 0 pauses playback immediately. |
resumeAudioPlayer:
Resumes audio rendering with optional fade-in. Call this method after pauseAudioPlayer:.
| Parameter | Type | Description |
|---|---|---|
| fadeMs | NSInteger | Fade-in duration in milliseconds. 0 resumes playback immediately. |
interruptAudioPlayer:fadeMs:
Interrupts the current audio conversation and clears the playback buffer. This is commonly used when a user interrupts AI speech in a conversation.
| Parameter | Type | Description |
|---|---|---|
| trackType | AoqTrackType | Type of the track to interrupt |
| fadeMs | NSInteger | Fade-out duration in milliseconds. 0 interrupts playback immediately. |
enableSpeakerphone:
Switches audio output to the speaker or earpiece. Takes effect only after startAudioPlayer:.
| Parameter | Type | Description |
|---|---|---|
| enable | BOOL | YES switches to the speaker; NO switches to the earpiece. |
isSpeakerphoneEnabled
Checks whether audio is currently output through the speaker.
setAudioSessionRestriction:
Sets the SDK's AVAudioSession control permissions (iOS only). Limits SDK control when the application manages AVAudioSession itself.
| Parameter | Type | Description |
|---|---|---|
| restriction | int | AVAudioSession permission bitmask corresponding to AoqAudioSessionRestriction. Multiple flags can be combined using bitwise OR. |
Audio codec configuration
Audio encoding configuration
setAudioEncoderConfig:
Configures audio encoding for publishing. Configuration changes take effect immediately.
| Parameter | Type | Description |
|---|---|---|
| config | AoqAudioCodecConfig * | Audio encoding configuration. Set trackType to AoqTrackTypeAudio. |
setAudioDecoderConfig:
Configures audio decoding for subscribed audio. The settings must match the remote encoding settings.
| Parameter | Type | Description |
|---|---|---|
| config | AoqAudioCodecConfig * | Audio decoding configuration. Set trackType to AoqTrackTypeAudio. |
Audio file playback
startAudioFile:config:
Starts streaming and playing a local audio file. Remote streaming and local playback can run simultaneously, with their volumes controlled by publishVolume and playoutVolume, respectively.
| Parameter | Type | Description |
|---|---|---|
| fileId | NSString * | Application-defined file identifier used for subsequent control |
| config | AoqAudioFileMixConfig * | Audio file playback configuration |
stopAudioFile:
Stops audio file playback.
| Parameter | Type | Description |
|---|---|---|
| fileId | NSString * | File identifier, matching the value passed to startAudioFile:config: |
pauseAudioFile:
Pauses audio file playback.
| Parameter | Type | Description |
|---|---|---|
| fileId | NSString * | File identifier |
resumeAudioFile:
Resumes audio file playback. Call this method after pauseAudioFile:.
| Parameter | Type | Description |
|---|---|---|
| fileId | NSString * | File identifier |
getAudioFileDuration:
Gets the total duration of an audio file.
| Parameter | Type | Description |
|---|---|---|
| fileId | NSString * | File identifier |
getAudioFileCurrentPosition:
Gets the current playback position of an audio file.
| Parameter | Type | Description |
|---|---|---|
| fileId | NSString * | File identifier |
setAudioFilePositionMillis:positionMillis:
Sets the playback position of an audio file (seek).
| Parameter | Type | Description |
|---|---|---|
| fileId | NSString * | File identifier |
| positionMillis | long long | Target playback position in milliseconds |
setAudioFileVolume:type:volume:
Sets the audio file volume. Streaming and local playback volumes can be controlled separately.
| Parameter | Type | Description |
|---|---|---|
| fileId | NSString * | File identifier |
| type | AoqAudioStreamDirection | Volume direction. AoqAudioStreamPublish controls streaming; AoqAudioStreamPlayout controls playback. |
| volume | NSInteger | Volume. Valid values: 0-100. |
getAudioFileVolume:type:
Gets the current audio file volume.
| Parameter | Type | Description |
|---|---|---|
| fileId | NSString * | File identifier |
| type | AoqAudioStreamDirection | Volume direction |
External audio streams
addAudioExternalStream:config:
Adds an external audio stream. Multiple independent streams can be created and distinguished by streamId.
| Parameter | Type | Description |
|---|---|---|
| streamId | NSString * | Application-defined external stream identifier |
| config | AoqAudioExternalStreamConfig * | External audio stream configuration |
pushAudioExternalStreamData:data:
Feeds external PCM audio data into the specified stream.
| Parameter | Type | Description |
|---|---|---|
| streamId | NSString * | External stream identifier |
| data | AoqAudioFrameData * | PCM audio frame data |
setAudioExternalStreamVolume:type:volume:
Sets the external audio stream volume. Streaming and local playback volumes can be controlled separately.
| Parameter | Type | Description |
|---|---|---|
| streamId | NSString * | External stream identifier |
| type | AoqAudioStreamDirection | Volume direction |
| volume | NSInteger | Volume. Valid values: 0-100. |
getAudioExternalStreamVolume:type:
Gets the current external audio stream volume.
| Parameter | Type | Description |
|---|---|---|
| streamId | NSString * | External stream identifier |
| type | AoqAudioStreamDirection | Volume direction |
clearAudioExternalStreamBuffer:fadeoutMs:
Clears the external audio stream buffer with optional fade-out. Commonly used to interrupt current playback.
| Parameter | Type | Description |
|---|---|---|
| streamId | NSString * | External stream identifier |
| fadeoutMs | NSInteger | Fade-out duration in milliseconds. -1 uses the default value, 0 clears the buffer immediately, and a value greater than 0 retains the specified duration for fade-out. |
removeAudioExternalStream:
Removes an external audio stream and releases its resources.
| Parameter | Type | Description |
|---|---|---|
| streamId | NSString * | External stream identifier |
Audio frame callbacks
setAudioFrameObserver:
Sets the audio frame delegate. Pass delegate=nil to remove it.
| Parameter | Type | Description |
|---|---|---|
| delegate | id<AoqAudioFrameDelegate> | Audio frame delegate protocol. Pass nil to remove it. |
enableAudioFrameObserver:audioSource:config:
Enables or disables audio frame callbacks at the specified position.
| Parameter | Type | Description |
|---|---|---|
| enabled | BOOL | YES enables callbacks; NO disables them. |
| audioSource | AoqAudioSource | Audio source position: capture, after 3A processing, publishing, or playback |
| config | AoqAudioObserverConfig * | Callback configuration |
Local audio volume indication
enableLocalAudioVolumeIndication:
Enables or disables local captured audio volume indications. When enabled, the SDK invokes onLocalAudioVolumeIndication: at config.interval intervals to report the local captured volume and whether speech is detected.
| Parameter | Type | Description |
|---|---|---|
| config | AoqAudioVolumeIndicationConfig * | Volume indication configuration. interval<=0 disables callbacks. |
Video device management
startVideoCapture:
Opens the video capture device (camera). Captured video is sent over AoqTrackTypeVideo. For external video input (pushExternalVideoCapturedFrame:frame:), set isExternal to YES; the camera is not opened in this mode.
| Parameter | Type | Description |
|---|---|---|
| config | AoqVideoCaptureConfig * | Video capture configuration. |
stopVideoCapture
Closes the video capture device and stops local video capture.
switchCamera:
Switches between the front and rear cameras. Call this method after startVideoCapture:(isExternal=NO).
| Parameter | Type | Description |
|---|---|---|
| direction | AoqCameraDirection | Target camera direction: AoqCameraDirectionFront for the front camera and AoqCameraDirectionBack for the rear camera. |
setLocalView:canvas:
Sets or removes the local video rendering view. Pass canvas=nil or canvas.view=nil to unbind rendering.
| Parameter | Type | Description |
|---|---|---|
| trackType | AoqTrackType | Track type. Set to AoqTrackTypeVideo for local preview. |
| canvas | AoqVideoCanvas * | Video rendering canvas. Pass nil to unbind it. |
setRemoteView:canvas:
Sets or removes the remote video rendering view. Pass canvas=nil or canvas.view=nil to unbind it.
| Parameter | Type | Description |
|---|---|---|
| trackType | AoqTrackType | Track type |
| canvas | AoqVideoCanvas * | Video rendering canvas. Pass nil to unbind it. |
Video encoding and external input
setVideoEncoderConfig:
Configures video encoding for publishing, routed by config.trackType. If isExternal=YES, pushExternalVideoEncodedFrame:frame: sends encoded frames directly without re-encoding by the SDK.
| Parameter | Type | Description |
|---|---|---|
| config | AoqVideoCodecConfig * | Video encoding configuration. |
setVideoDecoderConfig:
Configures video decoding for subscribed video, routed by config.trackType. Only trackType/codecType/width/height/fps/bitrate apply to decoding. The other fields apply only to encoding.
| Parameter | Type | Description |
|---|---|---|
| config | AoqVideoCodecConfig * | Video decoding configuration. |
pushExternalVideoCapturedFrame:frame:
Pushes external raw video frames for encoding and transmission by the SDK. Frames are routed by trackType. External capture must be enabled for the corresponding track.
| Parameter | Type | Description |
|---|---|---|
| trackType | AoqTrackType | Track type. For AoqTrackTypeVideo, call startVideoCapture:(isExternal=YES) first. For AoqTrackTypeScreen, call startScreenCapture:(isExternal=YES) first. |
| frame | AoqVideoFrame * | External video frame data. |
pushExternalVideoEncodedFrame:frame:
Pushes external encoded video frames. The SDK packetizes and sends them without re-encoding. Frames are consumed only after setVideoEncoderConfig:(isExternal=YES) is called for the corresponding trackType. startVideoCapture:/startScreenCapture: is not required.
| Parameter | Type | Description |
|---|---|---|
| trackType | AoqTrackType | Track type. Supports AoqTrackTypeVideo / AoqTrackTypeScreen. |
| frame | AoqVideoEncodedFrame * | External encoded video frame. |
Screen capture
config specifies screen capture settings. Screen content is sent on the AoqTrackTypeScreen track.
For start, 0 means that the request is accepted; onScreenCaptureStateChanged reports the result asynchronously. A nonzero return rejects the request synchronously without a duplicate failure event. Stop returns 0 on success or a nonzero value on failure, and reports the stopped state through this callback.
With isExternal=NO, capture uses a Broadcast Upload Extension. Integrate and configure AoqScreenShare.framework and display the system broadcast picker. On timeout, the onScreenCaptureStateChanged: callback reports failure with AoqECScreenStartFailed. You do not need to wait for Started before enabling transmission.
For external raw frames, set isExternal=YES. This does not enable the Extension receiving channel. Supply raw Screen frames through pushExternalVideoCapturedFrame for SDK encoding. For external encoded frames, configure the Screen track for external encoding with setVideoEncoderConfig, then call pushExternalVideoEncodedFrame; startScreenCapture is not required.
Media stream transmission control
enableSendMediaStream:enable:
Enables or disables sending a local media stream, selected by trackType. When sending is disabled, capture and encoding continue, but data is not sent over the network.
| Parameter | Type | Description |
|---|---|---|
| trackType | AoqTrackType | Track type. Supports AoqTrackTypeAudio/AoqTrackTypeVideo/AoqTrackTypeScreen. |
| enable | BOOL | YES enables sending; NO disables sending. |
Video frame callbacks
setVideoFrameObserver:
Sets the video frame delegate. Pass delegate=nil to remove it.
| Parameter | Type | Description |
|---|---|---|
| delegate | id<AoqVideoFrameDelegate> | Video frame delegate protocol. Pass nil to remove it. |
enableVideoFrameObserver:videoSource:config:
Enables or disables video frame callbacks at the specified position.
| Parameter | Type | Description |
|---|---|---|
| enabled | BOOL | YES enables callbacks; NO disables them. |
| videoSource | AoqVideoSource | Video source position: after capture, before encoding, or after remote decoding |
| config | AoqVideoObserverConfig * | Callback configuration. Use config.trackType to observe the Video or Screen track. |
AoqEngineDelegate callbacks
onScreenCaptureStateChanged: is @optional. All other AoqEngineDelegate callbacks are @required.
Real-time messages
sendDataMsg:
Sends a real-time data message to the remote end. Call this method after connect: succeeds and enableSendMediaStream:(Data, YES) is called.
| Parameter | Type | Description |
|---|---|---|
| msg | AoqDataMsg * | Data message |
AoqEngineDelegate callbacks
onError:message:
Engine error callback. Triggered when an unrecoverable error occurs.
| Parameter | Type | Description |
|---|---|---|
| code | NSInteger | Error code corresponding to an AoqErrorCode enum value |
| message | NSString * | Error description |
onWarning:message:
Engine warning callback. Triggered by recoverable exceptions that do not prevent the SDK from continuing to run.
| Parameter | Type | Description |
|---|---|---|
| code | NSInteger | Warning code corresponding to an AoqWarningCode enum value |
| message | NSString * | Warning description |
onConnectionStatusChange:
Connection state change callback. State transitions: Disconnected → Connecting → Connected/Failed → Disconnected.
| Parameter | Type | Description |
|---|---|---|
| status | AoqConnectionStatus | Current connection state |
onStats:
Engine statistics callback. The SDK periodically reports audio/video publishing and subscription statistics and network statistics to monitor call quality and network conditions and diagnose audio/video issues.
| Parameter | Type | Description |
|---|---|---|
| stats | AoqStats * | Statistics for audio/video/data message publishing and subscription, and network statistics |
onAudioDeviceStateChanged:
Callback for audio device capture/playback state changes.
| Parameter | Type | Description |
|---|---|---|
| state | AoqAudioDeviceState * | Audio device state, including state (state code) and reason (error reason) |
onAudioDeviceRouteChanged:
Callback for audio output route changes.
| Parameter | Type | Description |
|---|---|---|
| routeType | NSInteger | Current audio output route, corresponding to an AoqAudioDeviceRouteType enum value |
onAudioDeviceInterrupted:
Audio device interruption callback. Triggered by system interruptions, such as incoming calls or another app taking audio focus.
| Parameter | Type | Description |
|---|---|---|
| interrupt | BOOL | YES indicates interruption; NO indicates recovery from interruption. |
onAudioFileState:
Audio file playback state callback.
| Parameter | Type | Description |
|---|---|---|
| state | AoqAudioFileState * | Audio file playback state, including fileId, stateCode, and errorCode |
onLocalAudioVolumeIndication:
Reports the locally captured audio volume. Triggered only after volume indications are enabled through enableLocalAudioVolumeIndication:.
| Parameter | Type | Description |
|---|---|---|
| volume | AoqAudioVolume * | Local volume information, including isSpeech (whether speech is detected) and volume (smoothed instantaneous volume [0-255]). |
onVideoDeviceStateChanged:
Callback for video device capture state changes.
| Parameter | Type | Description |
|---|---|---|
| state | AoqVideoDeviceState * | Video device state, including state (state code) and reason (error reason) |
onDataMsg:
Callback for received real-time data messages.
| Parameter | Type | Description |
|---|---|---|
| msg | AoqDataMsg * | Data message |
onScreenCaptureStateChanged
Reports screen capture state changes (@optional) using AoqScreenCaptureStateCode and the unified AoqErrorCode. Notifications are delivered in order on the main thread. Screen capture failures are not also reported through onError:.
| Parameter | Type | Description |
|---|---|---|
| state | AoqScreenCaptureState * | Screen capture state, including state (state code) and reason (error cause). |
AoqAudioFrameDelegate callbacks
Audio frame delegate protocol. All methods are @optional; implement them as needed.
| Method | When triggered | Parameter |
|---|---|---|
| onCapturedAudioFrame: | When a raw audio frame is captured | frame: AoqAudioFrameData * |
| onProcessCapturedAudioFrame: | Audio frame after 3A processing | frame: AoqAudioFrameData * |
| onPublishAudioFrame:frame: | Audio frame before publishing | trackType: track type; frame: AoqAudioFrameData * |
| onPlaybackAudioFrame: | Remote audio frame before playback | frame: AoqAudioFrameData * |
onCapturedAudioFrame
Called when a raw audio frame is captured. The frame contains unprocessed PCM data.
| Parameter | Type | Description |
|---|---|---|
| frame | AoqAudioFrameData * | Captured audio frame data |
onProcessCapturedAudioFrame
Called for an audio frame after 3A processing, such as echo cancellation and noise suppression.
| Parameter | Type | Description |
|---|---|---|
| frame | AoqAudioFrameData * | Audio frame data after 3A processing |
onPublishAudioFrame
Called for an audio frame before publishing, immediately before encoding and transmission.
| Parameter | Type | Description |
|---|---|---|
| trackType | AoqTrackType | Track type |
| frame | AoqAudioFrameData * | Audio frame data before publishing |
onPlaybackAudioFrame
Called for a remote audio frame before playback, after decoding and mixing.
| Parameter | Type | Description |
|---|---|---|
| frame | AoqAudioFrameData * | Remote audio frame data before playback |
AoqVideoFrameDelegate callbacks
Video frame delegate protocol. All methods are @optional. Returning NO indicates no data modification. Each of the three callbacks includes trackType to distinguish Video and Screen tracks.
| Method | When triggered | Parameter |
|---|---|---|
| onCapturedVideoFrame:frame: | When a raw video frame is captured (before preprocessing) | trackType: track type; frame: AoqVideoFrame * |
| onPreEncodeVideoFrame:frame: | Video frame before encoding (after preprocessing) | trackType: track type; frame: AoqVideoFrame * |
| onRemoteVideoFrame:frame: | Remote video frame after decoding and before rendering | trackType: track type; frame: AoqVideoFrame * |
onCapturedVideoFrame
Called when a raw video frame is captured, before preprocessing.
| Parameter | Type | Description |
|---|---|---|
| trackType | AoqTrackType | Track type (Video/Screen) |
| frame | AoqVideoFrame * | Captured video frame data |
onPreEncodeVideoFrame
Called for a video frame after preprocessing and before encoding.
| Parameter | Type | Description |
|---|---|---|
| trackType | AoqTrackType | Track type (Video/Screen) |
| frame | AoqVideoFrame * | Video frame data before encoding |
onRemoteVideoFrame
Called for a remote video frame after decoding and before rendering.
| Parameter | Type | Description |
|---|---|---|
| trackType | AoqTrackType | Track type (Video/Screen) |
| frame | AoqVideoFrame * | Decoded remote video frame data |
Data types and enumerations
Common types
AoqCreateConfig (fields added in v1.3.0)
| Field | Type | Default | Description |
|---|---|---|---|
| maxEncodedVideoFrameBytes | NSInteger | 190 × 1024 | Maximum encoded frame size in bytes. Applies only to the SDK internal JPEG encoder. |
| enableDropOversizedVideoFrame | BOOL | NO | For the SDK internal JPEG encoder, whether to drop a frame that remains oversized at the lowest quality. |
AoqConnectConfig
subscribeTracks must not include AoqTrackTypeScreen; otherwise, connect returns AoqECUnSupport without starting a connection. setRemoteView also returns AoqECUnSupport for Screen.
Field | Type | Description |
|---|---|---|
token | NSString * | Authentication token |
sid | NSString * | Session ID |
certFingerprint | NSString * | Server certificate fingerprint |
relayEndpoints | NSArray<AoqRelayEndpoint *> * | List of Relay endpoints |
workspaceIdHash | NSString * | Workspace ID hash |
publishTracks | NSArray<AoqTrackParam *> * | Local tracks to publish |
subscribeTracks | NSArray<AoqTrackParam *> * | Remote tracks to subscribe to |
AoqRelayEndpoint
Relay endpoint.
| Field | Type | Default value | Description |
|---|---|---|---|
| routeIndex | NSInteger | -1 | Route index |
| endpoint | NSString * | "" | Server address (domain name or IP address) |
| port | NSInteger | 0 | Server UDP port |
| tcpPort | NSInteger | 0 | TCP fallback port. 0 uses the SDK default port, 443. |
AoqTrackParam.trackMode
| Field | Type | Default | Description |
|---|---|---|---|
| trackMode | AoqTrackMode | AoqTrackModeSegment | Applies only to downstream audio. |
AoqTrackParam
Track properties.
| Field | Type | Default value | Description |
|---|---|---|---|
| trackType | AoqTrackType | AoqTrackTypeAudio | Track type |
| trackMode | AoqTrackMode | AoqTrackModeSegment | Streaming or non-streaming mode. Applies only to downstream audio. |
Enumerations
AoqTrackMode
| Value | Number | Description |
|---|---|---|
| AoqTrackModeSegment | 0 | Segment mode: delivers data in semantic segments, such as sentences. Applies only to downstream audio. |
| AoqTrackModeStream | 1 | Stream mode: delivers data continuously. Applies only to downstream audio. |
AoqErrorCode
Enum value | Value | Description |
|---|---|---|
AoqECOK | 0 | Success |
AoqECParamInvalid | 1 | Invalid parameter |
AoqECStateInvalid | 2 | Invalid state |
AoqECUnSupport | 3 | Unsupported operation |
AoqECAudio | 100 | Audio generic error |
AoqECAudioExternalBufferFull | 110 | External audio buffer full |
AoqECAudioDevice | 120 | Audio device generic error |
AoqECAudioDeviceRecordingAuthFailed | 121 | Recording permission not granted |
AoqECAudioDeviceRecordingOccupied | 122 | Recording device in use |
AoqECAudioDeviceRecordingBackgroundStart | 123 | Failed to start recording in background |
AoqECAudioDeviceRecordingStartFail | 124 | Recording start failed |
AoqECAudioDevicePlayoutOccupied | 125 | Playback device in use |
AoqECAudioDevicePlayoutBackgroundStart | 126 | Failed to start playback in background |
AoqECAudioDevicePlayoutStartFail | 127 | Playback start failed |
AoqECAudioDeviceEarpieceRequiresVoipMode | 128 | Earpiece requires VoIP mode |
AoqECVideo | 200 | Video generic error |
AoqECVideoExternalBufferFull | 210 | External video buffer full |
AoqECVideoExternalCaptureNotEnabled | 211 | External video capture not enabled |
AoqECVideoExternalEncoderNotEnabled | 212 | External video encoder not enabled |
AoqECVideoDevice | 220 | Video device generic error |
AoqECVideoDeviceCameraOpenFail | 221 | Camera open failed |
AoqECVideoDeviceCameraAuthFailed | 222 | Camera permission not granted |
AoqECVideoDeviceCameraOccupied | 223 | Camera in use |
AoqECVideoDeviceCameraRunningError | 224 | Camera runtime error |
AoqECVideoCodec | 230 | Video codec generic error |
AoqECVideoCodecEncoderInitFail | 231 | Video encoder initialization failed |
AoqECVideoRender | 240 | Video rendering generic error |
AoqECVideoRenderCreateFail | 241 | Video renderer creation failed |
AoqECVideoRenderDrawError | 242 | Video rendering draw error |
| AoqECScreen | 300 | General screen sharing error |
| AoqECScreenAuthFailed | 310 | Screen sharing permission denied |
| AoqECScreenStartFailed | 311 | Failed to start screen sharing |
AoqTrackType
Enum value | Value | Description |
|---|---|---|
AoqTrackTypeAudio | 0 | Audio track |
AoqTrackTypeVideo | 1 | Video track |
AoqTrackTypeData | 2 | Data messaging track |
| AoqTrackTypeScreen | 3 | Screen sharing track. Uplink only. |
AoqWarningCode
Warning codes.
| Enum value | Value | Description |
|---|---|---|
| AoqWCOK | 0 | No warning |
| AoqWCAudio | 100 | General audio warning |
| AoqWCAudioHowling | 101 | Audio howling detected |
| AoqWCAudioDevice | 120 | General audio device warning |
| AoqWCAudioDeviceMicEnumerateError | 121 | Microphone enumeration error |
| AoqWCAudioDeviceMicStartTimeout | 122 | Microphone startup timeout |
| AoqWCAudioDeviceRecordingError | 123 | Recording error |
| AoqWCAudioDeviceSpeakerEnumerateError | 124 | Speaker enumeration error |
| AoqWCAudioDeviceSpeakerStartTimeout | 125 | Speaker startup timeout |
| AoqWCAudioDevicePlayoutError | 126 | Playback error |
| AoqWCVideo | 200 | General video warning |
| AoqWCVideoCameraEnumerateError | 201 | Camera enumeration error |
| AoqWCVideoEncoderSwitched | 202 | Video encoder switched |
| AoqWCVideoRenderDowngrade | 203 | Video rendering downgraded |
AoqEncoderType
Track media formats.
| Enum value | Value | Description |
|---|---|---|
| AoqEncoderTypeUnknown | 0 | Unknown format |
| AoqEncoderTypeAudioPCM | 1 | PCM audio |
| AoqEncoderTypeAudioOpus | 2 | Opus audio |
| AoqEncoderTypeVideoH264 | 3 | H.264 video |
| AoqEncoderTypeVideoJpeg | 4 | JPEG video |
| AoqEncoderTypeDataText | 5 | Text data |
AoqConnectionStatus
Engine connection states.
| Enum value | Value | Description |
|---|---|---|
| AoqConnectionStatusDisconnected | 0 | Disconnected |
| AoqConnectionStatusConnecting | 1 | Connecting |
| AoqConnectionStatusConnected | 2 | Connected |
| AoqConnectionStatusFailed | 3 | Connection failed |
AoqMirrorMode
Mirror mode.
| Enum value | Value | Description |
|---|---|---|
| AoqMirrorModeDisabled | 0 | Mirroring disabled |
| AoqMirrorModeEnabled | 1 | Mirroring enabled |
AoqOrientationMode
Video orientation.
| Enum value | Value | Description |
|---|---|---|
| AoqOrientationModeAuto | 0 | Automatic |
| AoqOrientationModePortrait | 1 | Portrait |
| AoqOrientationModeLandscape | 2 | Landscape |
Audio types
AoqAudioPlaybackConfig
Field | Type | Default | Description |
|---|---|---|---|
isVoipMode | BOOL | NO | YES: enable VoIP mode (hardware AEC); applies to mobile |
isDefaultSpeaker | BOOL | YES | YES: default to speaker; NO: earpiece |
isExternal | BOOL | NO | YES: external audio output |
channel | NSInteger | 1 | Channel count: 1 or 2 |
AoqAudioCaptureConfig
Audio capture configuration.
| Field | Type | Default value | Description |
|---|---|---|---|
| isExternal | BOOL | NO | Whether to use external capture |
| isVoipMode | BOOL | NO | Whether to enable VoIP mode (hardware AEC). Effective on mobile devices. |
| channel | NSInteger | 1 | Channel count. Supports 1/2. |
AoqAudioCodecConfig
Audio codec configuration shared by setAudioEncoderConfig: and setAudioDecoderConfig:.
| Field | Type | Default value | Description |
|---|---|---|---|
| trackType | AoqTrackType | AoqTrackTypeAudio | Track type |
| codecType | AoqEncoderType | AoqEncoderTypeAudioOpus | Encoding format |
| sampleRate | NSInteger | 48000 | Sample rate in Hz |
| channel | NSInteger | 1 | Number of channels |
| bitrate | NSInteger | 32000 | Bitrate in bps |
AoqAudioSessionRestriction
AVAudioSession permission bitmask (NS_OPTIONS; flags can be combined with bitwise OR). Used by setAudioSessionRestriction:.
| Enum value | Value | Description |
|---|---|---|
| AoqAudioSessionNone | 0 | No restrictions (the SDK fully manages AVAudioSession) |
| AoqAudioSessionSetCategory | 1 | Restricts the SDK from setting the category |
| AoqAudioSessionConfigureSession | 2 | Restricts the SDK from configuring the session |
| AoqAudioSessionDeactivateSession | 4 | Restricts the SDK from deactivating the session |
| AoqAudioSessionActivateSession | 8 | Restricts the SDK from activating the session |
AoqAudioDeviceStateCode
Audio device capture and playback state codes.
| Enum value | Value | Description |
|---|---|---|
| AoqAudioDeviceNone | 0 | No state |
| AoqAudioDeviceRecordStarting | 1 | Capture starting |
| AoqAudioDeviceRecordStarted | 2 | Capture started |
| AoqAudioDeviceRecordStopping | 3 | Capture stopping |
| AoqAudioDeviceRecordStopped | 4 | Capture stopped |
| AoqAudioDeviceRecordFail | 5 | Capture failed |
| AoqAudioDevicePlayStarting | 6 | Playback starting |
| AoqAudioDevicePlayStarted | 7 | Playback started |
| AoqAudioDevicePlayStopping | 8 | Playback stopping |
| AoqAudioDevicePlayStopped | 9 | Playback stopped |
| AoqAudioDevicePlayFail | 10 | Playback failed |
AoqAudioDeviceState
Audio device capture and playback state.
| Field | Type | Default value | Description |
|---|---|---|---|
| state | AoqAudioDeviceStateCode | AoqAudioDeviceNone | Device operation state |
| reason | NSInteger | 0 | Error reason code (see AoqErrorCode) |
AoqAudioDeviceRouteType
Audio device route types.
| Enum value | Value | Description |
|---|---|---|
| AoqAudioDeviceRouteDefault | 0 | Default route |
| AoqAudioDeviceRouteHeadset | 1 | Headset with microphone |
| AoqAudioDeviceRouteEarpiece | 2 | Earpiece |
| AoqAudioDeviceRouteHeadsetNoMic | 3 | Headset without microphone |
| AoqAudioDeviceRouteSpeakerPhone | 4 | Speaker |
| AoqAudioDeviceRouteUsb | 5 | USB audio device |
| AoqAudioDeviceRouteBluetooth | 6 | Bluetooth SCO mode |
| AoqAudioDeviceRouteBluetoothA2dp | 7 | Bluetooth A2DP mode |
Audio file types
AoqAudioFileMixConfig
Audio file playback configuration.
| Field | Type | Default value | Description |
|---|---|---|---|
| fileName | NSString * | "" | File name including its path. Must not be empty. |
| cycles | NSInteger | -1 | Loop count. -1 loops indefinitely. |
| startPosMs | NSInteger | 0 | Initial playback position in milliseconds |
| publishVolume | NSInteger | 100 | Publishing volume. Valid values: 0-100. |
| playoutVolume | NSInteger | 100 | Playback volume. Valid values: 0-100. |
AoqAudioFileStateCode
Audio file playback state codes.
| Enum value | Value | Description |
|---|---|---|
| AoqAudioFileNone | 0 | No state |
| AoqAudioFileStarted | 1 | Playback started |
| AoqAudioFileStopped | 2 | Playback stopped |
| AoqAudioFilePaused | 3 | Playback paused |
| AoqAudioFileResumed | 4 | Playback resumed |
| AoqAudioFileEnded | 5 | Playback ended |
| AoqAudioFileBuffering | 6 | Playback buffering |
| AoqAudioFileBufferingEnd | 7 | Buffering ended |
| AoqAudioFileFailed | 8 | Playback failed |
AoqAudioFileErrorCode
Audio file playback error codes.
| Enum value | Value | Description |
|---|---|---|
| AoqAudioFileNoError | 0 | No error |
| AoqAudioFileOpenFailed | 1 | Failed to open file |
| AoqAudioFileDecodeFailed | 2 | Failed to decode file |
AoqAudioFileState
Audio file state.
| Field | Type | Default value | Description |
|---|---|---|---|
| fileId | NSString * | "" | File identifier |
| stateCode | AoqAudioFileStateCode | AoqAudioFileNone | File playback state code |
| errorCode | AoqAudioFileErrorCode | AoqAudioFileNoError | File error code |
External audio stream and volume types
AoqAudioVolume
| Field | Type | Default | Description |
|---|---|---|---|
| isSpeech | BOOL | NO | Whether speech is detected. |
| volume | NSInteger | 0 | Smoothed instantaneous volume, from 0 to 255. |
AoqAudioVolumeIndicationConfig
| Field | Type | Default | Description |
|---|---|---|---|
| reportSpeech | BOOL | NO | Whether to detect speech. |
| interval | NSInteger | 0 | Callback interval in milliseconds. Values of 0 or less disable callbacks; values between 0 and 10 use 10. |
| smooth | NSInteger | 3 | Smoothing factor, from 0 to 10. Higher values produce smoother results. |
AoqAudioStreamDirection
Audio stream directions.
| Enum value | Value | Description |
|---|---|---|
| AoqAudioStreamPublish | 0 | Publishing stream |
| AoqAudioStreamPlayout | 1 | Playback stream |
AoqAudioExternalStreamToggle
External audio stream toggle states.
| Enum value | Value | Description |
|---|---|---|
| AoqAudioExternalStreamToggleNormal | 0 | Normal state |
| AoqAudioExternalStreamTogglePause | 1 | Paused state |
AoqAudioExternalStreamConfig
External audio stream configuration.
| Field | Type | Default value | Description |
|---|---|---|---|
| trackType | AoqTrackType | AoqTrackTypeAudio | Audio track type |
| codecType | AoqEncoderType | AoqEncoderTypeAudioPCM | Audio stream format |
| channels | NSInteger | 1 | Number of channels |
| sampleRate | NSInteger | 48000 | Sample rate in Hz |
| playoutVolume | NSInteger | 100 | Playback volume (0-100) |
| publishVolume | NSInteger | 100 | Publishing volume (0-100) |
| maxBufferDuration | NSInteger | 1000 | Maximum buffer duration in milliseconds |
| enable3A | BOOL | NO | Whether to apply 3A processing to input PCM |
AoqAudioFrameData
External audio frame data.
| Field | Type | Default value | Description |
|---|---|---|---|
| dataPtr | void * | NULL | Pointer to raw PCM audio data (@Nullable) |
| dataSize | NSInteger | 0 | PCM data size in bytes |
| numOfSamples | NSInteger | 0 | Number of samples per channel |
| bytesPerSample | NSInteger | 0 | Bytes per sample |
| numOfChannels | NSInteger | 0 | Number of channels |
| samplesPerSec | NSInteger | 0 | Samples per second (sample rate) |
| pushSequence | int32_t | 0 | PCM input round |
| timeStamp | int64_t | 0 | Timestamp |
| autoGenMute | BOOL | NO | Valid in data callbacks. YES indicates SDK-generated silence. |
AoqAudioSource
Audio frame callback data sources.
| Enum value | Value | Description |
|---|---|---|
| AoqAudioSourceCaptured | 0 | Captured audio data |
| AoqAudioSourceProcessCaptured | 1 | Audio data after 3A processing |
| AoqAudioSourcePublish | 2 | Published audio data |
| AoqAudioSourcePlayback | 3 | Playback audio data |
AoqAudioObserverMode
Audio frame callback modes.
| Enum value | Value | Description |
|---|---|---|
| AoqAudioObserverModeReadOnly | 0 | Read-only mode |
| AoqAudioObserverModeReadWrite | 1 | Read-write mode |
AoqAudioObserverConfig
Audio frame callback configuration.
| Field | Type | Default value | Description |
|---|---|---|---|
| sampleRate | NSInteger | 48000 | Callback audio sample rate in Hz |
| channels | NSInteger | 1 | Callback audio channel count |
| mode | AoqAudioObserverMode | AoqAudioObserverModeReadOnly | Read-write mode |
Video types
AoqScreenCaptureState
| Field | Type | Default | Description |
|---|---|---|---|
| state | AoqScreenCaptureStateCode | AoqScreenCaptureNone | Screen capture state. |
| reason | NSInteger | 0 | 0 for normal states; an AoqErrorCode on failure. |
AoqScreenCaptureStateCode
| Value | Number | Description |
|---|---|---|
| AoqScreenCaptureNone | 0 | None |
| AoqScreenCaptureStarting | 1 | Starting |
| AoqScreenCaptureStarted | 2 | Input ready; does not indicate transmission |
| AoqScreenCaptureStopping | 3 | Stopping |
| AoqScreenCaptureStopped | 4 | Stopped |
| AoqScreenCaptureFail | 5 | Start or runtime failure |
AoqScreenCaptureConfig
| Field | Type | Default | Description |
|---|---|---|---|
| isExternal | BOOL | NO | Whether the application supplies raw screen frames. |
| appGroup | NSString * | nil | Optional AppGroup ID shared by the app and Broadcast Extension. If nil, settings are delivered through the socket handshake and neither target needs the App Groups capability. Ignored for external capture. |
AoqVideoCodecConfig
| Field | Type | Default | Description |
|---|---|---|---|
| trackType | AoqTrackType | AoqTrackTypeVideo | Track type |
| codecType | AoqEncoderType | AoqEncoderTypeVideoH264 | Codec |
| width | NSInteger | 540 | Width in pixels |
| height | NSInteger | 960 | Height in pixels |
| fps | NSInteger | 5 | Frame rate |
| bitrate | NSInteger | 500000 | Bitrate in bps |
| minBitrate | NSInteger | 128000 | Minimum bitrate in bps |
| keyframeInterval | NSInteger | 2 | Keyframe interval in seconds |
| mirrorMode | AoqMirrorMode | AoqMirrorModeDisabled | Mirror mode |
| orientationMode | AoqOrientationMode | AoqOrientationModeAuto | Orientation mode |
| isExternal | BOOL | NO | Whether the application supplies encoded frames. |
AoqRenderMode
Rendering modes.
| Enum value | Value | Description |
|---|---|---|
| AoqRenderModeAuto | 0 | Automatic mode |
| AoqRenderModeStretch | 1 | Stretch mode. The image is distorted when aspect ratios differ. |
| AoqRenderModeFill | 2 | Letterbox mode. Black bars are added above and below or on the sides when aspect ratios differ. |
| AoqRenderModeCrop | 3 | Crop mode. Width or height is cropped when aspect ratios differ, removing part of the image. |
AoqVideoCanvas
Video rendering canvas.
| Field | Type | Default value | Description |
|---|---|---|---|
| view | UIView * | nil | Display view. Pass nil to remove the rendering binding (@Nullable). |
| renderMode | AoqRenderMode | AoqRenderModeAuto | Rendering mode |
AoqCameraDirection
Camera direction.
| Enum value | Value | Description |
|---|---|---|
| AoqCameraDirectionFront | 0 | Front camera |
| AoqCameraDirectionBack | 1 | Rear camera (effective on mobile devices) |
AoqVideoCaptureConfig
Video capture configuration.
| Field | Type | Default value | Description |
|---|---|---|---|
| width | NSInteger | 1280 | Capture width in pixels. Ignored when isExternal=YES. |
| height | NSInteger | 720 | Capture height in pixels. Ignored when isExternal=YES. |
| fps | NSInteger | 15 | Capture frame rate. Ignored when isExternal=YES (timing is determined by frame input). |
| isExternal | BOOL | NO | Whether to use external capture. When YES, the camera is not opened; supply frames through pushExternalVideoCapturedFrame:. |
| cameraDirection | AoqCameraDirection | AoqCameraDirectionFront | Camera direction. Ignored when isExternal=YES. |
AoqVideoPixelFormat
Video pixel formats.
| Enum value | Value | Description |
|---|---|---|
| AoqVideoPixelFormatUnknown | 0 | Unknown format |
| AoqVideoPixelFormatI420 | 1 | I420 (YUV planar format) |
| AoqVideoPixelFormatNV12 | 2 | NV12 (YUV semi-planar format) |
| AoqVideoPixelFormatNV21 | 3 | NV21 (YUV semi-planar format) |
| AoqVideoPixelFormatBGRA | 4 | BGRA (32-bit) |
| AoqVideoPixelFormatRGBA | 5 | RGBA (32-bit) |
| AoqVideoPixelFormatCVPixelBuffer | 6 | Apple zero-copy path. Set pixelBuffer to a CVPixelBufferRef. |
AoqVideoFrame
External video data, also used in video frame callbacks (AoqVideoFrameDelegate).
| Field | Type | Default value | Description |
|---|---|---|---|
| format | AoqVideoPixelFormat | AoqVideoPixelFormatUnknown | Pixel format |
| width | NSInteger | 0 | Width in pixels |
| height | NSInteger | 0 | Height in pixels |
| data | NSData * | nil | Packed-format data (NV12/NV21/BGRA/RGBA) (@Nullable) |
| dataY | NSData * | nil | I420 Y plane data (@Nullable) |
| dataU | NSData * | nil | I420 U plane data (@Nullable) |
| dataV | NSData * | nil | I420 V plane data (@Nullable) |
| strideY | NSInteger | 0 | Y plane stride |
| strideU | NSInteger | 0 | U plane stride |
| strideV | NSInteger | 0 | V plane stride |
| pixelBuffer | CVPixelBufferRef | NULL | Apple zero-copy buffer. Used when format=AoqVideoPixelFormatCVPixelBuffer (@Nullable). |
| timeStamp | int64_t | 0 | Timestamp in milliseconds. If 0, the SDK fills it in using the local clock. |
AoqVideoCodecType
Codec type for externally encoded frames.
| Enum value | Value | Description |
|---|---|---|
| AoqVideoCodecTypeJPEG | 0 | JPEG encoding |
AoqVideoEncodedFrame
Externally encoded video frame. The application encodes the frame; the SDK packages and sends it without re-encoding.
| Field | Type | Default value | Description |
|---|---|---|---|
| codec | AoqVideoCodecType | AoqVideoCodecTypeJPEG | Encoding format |
| data | NSData * | Non-empty | Encoded data |
| width | NSInteger | 0 | Width in pixels |
| height | NSInteger | 0 | Height in pixels |
| timeStamp | int64_t | 0 | Timestamp in milliseconds. If 0, the SDK fills it in using the local clock. |
AoqVideoDeviceStateCode
Video device capture state codes.
| Enum value | Value | Description |
|---|---|---|
| AoqVideoDeviceNone | 0 | No state |
| AoqVideoDeviceCaptureStarting | 1 | Camera starting |
| AoqVideoDeviceCaptureStarted | 2 | Camera started |
| AoqVideoDeviceCaptureStopping | 3 | Camera stopping |
| AoqVideoDeviceCaptureStopped | 4 | Camera stopped |
| AoqVideoDeviceCaptureFail | 5 | Camera startup failed |
AoqVideoDeviceState
Video device capture state.
| Field | Type | Default value | Description |
|---|---|---|---|
| state | AoqVideoDeviceStateCode | AoqVideoDeviceNone | Device capture state |
| reason | NSInteger | 0 | Error reason code (see AoqErrorCode) |
Video frame callback types
AoqVideoSource
Video frame callback data sources (pipeline positions).
| Enum value | Value | Description |
|---|---|---|
| AoqVideoSourceCaptured | 0 | Video data after capture (before preprocessing) |
| AoqVideoSourcePreEncode | 1 | Video data before encoding (after preprocessing) |
| AoqVideoSourceRemote | 2 | Remote video data after decoding and before rendering |
AoqVideoObserverMode
Video frame callback modes.
| Enum value | Value | Description |
|---|---|---|
| AoqVideoObserverModeReadOnly | 0 | Read-only mode |
| AoqVideoObserverModeReadWrite | 1 | Read-write mode |
AoqVideoObserverAlignment
Video output width alignment.
| Enum value | Value | Description |
|---|---|---|
| AoqVideoObserverAlignmentDefault | 0 | Default alignment |
| AoqVideoObserverAlignmentEven | 1 | Even alignment |
| AoqVideoObserverAlignment4 | 2 | 4-byte alignment |
| AoqVideoObserverAlignment8 | 3 | 8-byte alignment |
| AoqVideoObserverAlignment16 | 4 | 16-byte alignment |
AoqVideoObserverConfig
Video frame callback configuration.
| Field | Type | Default value | Description |
|---|---|---|---|
| trackType | AoqTrackType | AoqTrackTypeVideo | Video track to observe. Only Video and Screen are supported. |
| format | AoqVideoPixelFormat | AoqVideoPixelFormatI420 | Desired callback pixel format |
| alignment | AoqVideoObserverAlignment | AoqVideoObserverAlignmentDefault | Width alignment policy |
| mode | AoqVideoObserverMode | AoqVideoObserverModeReadOnly | Read/write mode. Only I420/CVPixelBuffer supports read-write access. |
| mirrorApplied | BOOL | NO | Whether to mirror callback data |
Data message types
AoqDataMsg
Real-time message data structure.
| Field | Type | Default value | Description |
|---|---|---|---|
| data | NSData * | Empty NSData | Message data referencing memory owned by the caller |
Statistics types
AoqStats
Field | Type | Description |
|---|---|---|
audioPublishStats | NSArray<AoqAudioPublishStats *> * | Audio publish statistics |
videoPublishStats | NSArray<AoqVideoPublishStats *> * | Video publish statistics |
dataMsgPublishStats | NSArray<AoqDataMsgPublishStats *> * | Data message publish statistics |
audioSubscribeStats | NSArray<AoqAudioSubscribeStats *> * | Audio subscribe statistics |
videoSubscribeStats | NSArray<AoqVideoSubscribeStats *> * | Video subscribe statistics |
dataMsgSubscribeStats | NSArray<AoqDataMsgSubscribeStats *> * | Data message subscribe statistics |
networkStats | AoqNetworkStats * | Network statistics |
AoqNetworkStats
Field | Type | Description |
|---|---|---|
sendBitrate | NSUInteger | Send bitrate (bps) |
sendBytes | NSUInteger | Cumulative bytes sent |
recvBitrate | NSUInteger | Receive bitrate (bps) |
recvBytes | NSUInteger | Cumulative bytes received |
loss | NSUInteger | Packet loss rate |
rtt | NSUInteger | Round-trip time (ms) |
AoqAudioPublishStats
Audio publishing statistics.
| Field | Type | Description |
|---|---|---|
| trackType | AoqTrackType | Track type |
| bitrate | NSUInteger | Bitrate in bps |
| bytes | NSUInteger | Total bytes sent |
| encodeVolume | NSUInteger | Publishing encoding volume |
AoqVideoPublishStats
Video publishing statistics.
| Field | Type | Description |
|---|---|---|
| trackType | AoqTrackType | Track type |
| bitrate | NSUInteger | Bitrate in bps |
| bytes | NSUInteger | Total bytes sent |
| encodeFps | NSUInteger | Encoding frame rate |
AoqAudioSubscribeStats
Audio subscription statistics.
| Field | Type | Description |
|---|---|---|
| trackType | AoqTrackType | Track type |
| bitrate | NSUInteger | Bitrate in bps |
| bytes | NSUInteger | Total bytes received |
| playVolume | NSUInteger | Playback volume |
AoqVideoSubscribeStats
Video subscription statistics.
| Field | Type | Description |
|---|---|---|
| trackType | AoqTrackType | Track type |
| bitrate | NSUInteger | Bitrate in bps |
| bytes | NSUInteger | Total bytes received |
| decodeFps | NSUInteger | Decoding frame rate |
| renderFps | NSUInteger | Rendering frame rate |
AoqDataMsgPublishStats
Data message publishing statistics.
| Field | Type | Description |
|---|---|---|
| trackType | AoqTrackType | Track type |
| bitrate | NSUInteger | Bitrate in bps |
| bytes | NSUInteger | Total bytes sent |
AoqDataMsgSubscribeStats
Data message subscription statistics.
| Field | Type | Description |
|---|---|---|
| trackType | AoqTrackType | Track type |
| bitrate | NSUInteger | Bitrate in bps |
| bytes | NSUInteger | Total bytes received |