The AOQ Client SDK for Android provides a full set of real-time audio/video communication capabilities, including engine lifecycle management, audio/video capture and playback, codec configuration, external audio stream injection, audio file mixing, real-time messaging, and audio/video frame callbacks. This document is the complete Java API reference for the Android platform.
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 |
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 listener |
| 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 |
| 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 listener |
| enableVideoFrameObserver | Enable or disable video frame callbacks at a specified stage |
Real-time messages
| API | Description |
|---|---|
| sendDataMsg | Send a real-time data message |
AoqClientListener 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 |
| onScreenCaptureStateChanged | Screen capture status change callback |
| onVideoDeviceStateChanged | Video device operation status change callback |
| onAudioDeviceFocusChanged | Audio focus change callback |
| onAudioFileState | Audio file playback status callback |
| onLocalAudioVolumeIndication | Local capture volume indication callback |
| onDataMsg | Received real-time data message callback |
AoqAudioFrameListener 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. |
AoqVideoFrameListener 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
pushExternalVideoCapturedFrame supports Video and Screen. Enable external capture on the corresponding track first; otherwise, it returns AoqECVideoExternalCaptureNotEnabled (211).
Engine lifecycle
createEngine
Create the engine instance. The SDK holds the engine as a global singleton; calling this method again returns the existing instance.
Parameter | Type | Description |
|---|---|---|
context | Context | Android application context |
config | AoqCreateConfig | Engine creation configuration |
listener | AoqClientListener | Engine event callback listener |
| Parameter | Type | Description |
|---|---|---|
| config | AoqConnectConfig | Connection configuration, including Token, SID, Relay endpoints, and publishing/subscription tracks |
Audio device management
startAudioCapture
Opens the audio capture device (microphone) and starts capturing local audio. For external audio input (pushAudioExternalStreamData), set isExternal to true. 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 | boolean | true mutes capture; false unmutes it. |
startAudioPlayer
Starts audio rendering and plays remote audio through the speaker or earpiece. For external rendering (playing PCM yourself), set isExternal to true.
| 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 | int | 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 | int | Fade-in duration in milliseconds. 0 resumes playback immediately. |
interruptAudioPlayer
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 | int | 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 | boolean | true switches to the speaker; false switches to the earpiece. |
isSpeakerphoneEnabled
Checks whether audio is currently output through the speaker.
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
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 | String | Application-defined file identifier used for subsequent control |
| config | AoqAudioFileMixConfig | Audio file playback configuration |
stopAudioFile
Stops audio file playback.
| Parameter | Type | Description |
|---|---|---|
| fileId | String | File identifier, matching the value passed to startAudioFile |
pauseAudioFile
Pauses audio file playback.
| Parameter | Type | Description |
|---|---|---|
| fileId | String | File identifier |
resumeAudioFile
Resumes audio file playback. Call this method after pauseAudioFile.
| Parameter | Type | Description |
|---|---|---|
| fileId | String | File identifier |
getAudioFileDuration
Gets the total duration of an audio file.
| Parameter | Type | Description |
|---|---|---|
| fileId | String | File identifier |
getAudioFileCurrentPosition
Gets the current playback position of an audio file.
| Parameter | Type | Description |
|---|---|---|
| fileId | String | File identifier |
setAudioFilePositionMillis
Sets the playback position of an audio file (seek).
| Parameter | Type | Description |
|---|---|---|
| fileId | String | File identifier |
| positionMillis | long | Target playback position in milliseconds |
setAudioFileVolume
Sets the audio file volume. Streaming and local playback volumes can be controlled separately.
| Parameter | Type | Description |
|---|---|---|
| fileId | String | File identifier |
| type | AoqAudioStreamDirection | Volume direction. AoqAudioStreamPublish controls streaming; AoqAudioStreamPlayout controls playback. |
| volume | int | Volume. Valid values: 0-100. |
getAudioFileVolume
Gets the current audio file volume.
| Parameter | Type | Description |
|---|---|---|
| fileId | String | File identifier |
| type | AoqAudioStreamDirection | Volume direction |
External audio streams
addAudioExternalStream
Adds an external audio stream. Multiple independent streams can be created and distinguished by streamId.
| Parameter | Type | Description |
|---|---|---|
| streamId | String | Application-defined external stream identifier |
| config | AoqAudioExternalStreamConfig | External audio stream configuration |
pushAudioExternalStreamData
Feeds external PCM audio data into the specified stream.
| Parameter | Type | Description |
|---|---|---|
| streamId | String | External stream identifier |
| data | AoqAudioFrameData | PCM audio frame data |
setAudioExternalStreamVolume
Sets the external audio stream volume. Streaming and local playback volumes can be controlled separately.
| Parameter | Type | Description |
|---|---|---|
| streamId | String | External stream identifier |
| type | AoqAudioStreamDirection | Volume direction |
| volume | int | Volume. Valid values: 0-100. |
getAudioExternalStreamVolume
Gets the current external audio stream volume.
| Parameter | Type | Description |
|---|---|---|
| streamId | String | External stream identifier |
| type | AoqAudioStreamDirection | Volume direction |
clearAudioExternalStreamBuffer
Clears the external audio stream buffer with optional fade-out. Commonly used to interrupt current playback.
| Parameter | Type | Description |
|---|---|---|
| streamId | String | External stream identifier |
| fadeoutMs | int | 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 | String | External stream identifier |
Audio frame callbacks
setAudioFrameObserver
Sets the audio frame listener. Pass listener=null to remove it.
| Parameter | Type | Description |
|---|---|---|
| listener | AoqAudioFrameListener | Audio frame listener. Pass null to remove it. |
enableAudioFrameObserver
Enables or disables audio frame callbacks at the specified position.
| Parameter | Type | Description |
|---|---|---|
| enabled | boolean | true enables callbacks; false 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), set isExternal to true; 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=false).
| Parameter | Type | Description |
|---|---|---|
| direction | AoqCameraDirection | Target camera direction: AoqCameraDirectionFront for the front camera and AoqCameraDirectionBack for the rear camera. |
setLocalView
Sets or removes the local video rendering view. Pass canvas=null or canvas.view=null to remove rendering.
| Parameter | Type | Description |
|---|---|---|
| trackType | AoqTrackType | Track type |
| canvas | AoqVideoCanvas | Video rendering canvas. Pass null to remove rendering. |
setRemoteView
Sets or removes the remote video rendering view. Pass canvas=null or canvas.view=null to unbind it.
| Parameter | Type | Description |
|---|---|---|
| trackType | AoqTrackType | Track type |
| canvas | AoqVideoCanvas | Video rendering canvas. Pass null to unbind it. |
Video encoding and external input
setVideoEncoderConfig
Configures video encoding for publishing. If isExternal=true, pushExternalVideoEncodedFrame sends encoded frames directly by trackType 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, and bitrate apply to decoding. The other fields apply only to encoding.
| Parameter | Type | Description |
|---|---|---|
| config | AoqVideoCodecConfig | Video decoding configuration. |
pushExternalVideoCapturedFrame
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=true) first. For AoqTrackTypeScreen, call startScreenCapture(isExternal=true) first. |
| frame | AoqVideoFrame | External video frame data. |
pushExternalVideoEncodedFrame
Pushes external encoded video frames. The SDK packetizes and sends them without re-encoding. Frames are consumed only after setVideoEncoderConfig(isExternal=true) is called for the corresponding trackType. startVideoCapture/startScreenCapture is not required.
| Parameter | Type | Description |
|---|---|---|
| trackType | AoqTrackType | Track type |
| frame | AoqVideoEncodedFrame | External encoded video frame. |
pushExternalVideoCapturedFrame consumes Video frames after startVideoCapture(isExternal=true) and Screen frames after startScreenCapture(isExternal=true). If the internal buffer is full, the method returns AoqECVideoExternalBufferFull (210).Screen capture
trackType supports AoqTrackTypeAudio, AoqTrackTypeVideo, and AoqTrackTypeScreen.
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. Stop returns 0 on success or a nonzero value on failure, and reports the stopped state through this callback.
With isExternal=false, the SDK captures through MediaProjection. Starting capture again while it is active returns AoqECStateInvalid; stopping is idempotent.
For external raw frames, set isExternal=true and 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
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 | boolean | true enables sending; false disables sending. |
Video frame callbacks
setVideoFrameObserver
Sets the video frame listener. Pass listener=null to remove it.
| Parameter | Type | Description |
|---|---|---|
| listener | AoqVideoFrameListener | Video frame listener. Pass null to remove it. |
enableVideoFrameObserver
Enables or disables video frame callbacks at the specified position.
| Parameter | Type | Description |
|---|---|---|
| enabled | boolean | true enables callbacks; false 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. |
Real-time messages
sendDataMsg
Sends a real-time data message to the remote end. Call this method after connect succeeds and enableSendMediaStream(Data, true) is called.
| Parameter | Type | Description |
|---|---|---|
| msg | AoqDataMsg | Data message |
AoqClientListener callbacks
onError
Engine error callback. Triggered when an unrecoverable error occurs.
| Parameter | Type | Description |
|---|---|---|
| code | int | Error code corresponding to an AoqErrorCode enum value |
| message | String | Error description |
onWarning
Engine warning callback. Triggered by recoverable exceptions that do not prevent the SDK from continuing to run.
| Parameter | Type | Description |
|---|---|---|
| code | int | Warning code corresponding to an AoqWarningCode enum value |
| message | String | 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 | int | 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 | boolean | true indicates interruption; false indicates recovery from interruption. |
onScreenCaptureStateChanged
Reports screen capture state changes using AoqScreenCaptureStateCode and the unified AoqErrorCode. Notifications are delivered in order on the Android main thread.
| Parameter | Type | Description |
|---|---|---|
| state | AoqScreenCaptureState | Screen capture state, including state (state code) and reason (error cause). |
onVideoDeviceStateChanged
Callback for video device capture state changes.
| Parameter | Type | Description |
|---|---|---|
| state | AoqVideoDeviceState | Video device state, including state (state code) and reason (error reason) |
onAudioDeviceFocusChanged
Callback for audio focus changes.
| Parameter | Type | Description |
|---|---|---|
| audioFocus | int | Android AUDIOFOCUS_* constant, such as AUDIOFOCUS_GAIN, AUDIOFOCUS_LOSS, or AUDIOFOCUS_LOSS_TRANSIENT |
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]). |
AoqClientListener is the unified delivery point for all asynchronous events from the SDK. All callback methods have a default empty implementation, so you only need to override the ones you care about.
onDataMsg
Callback for received real-time data messages.
| Parameter | Type | Description |
|---|---|---|
| msg | AoqDataMsg | Data message |
AoqAudioFrameListener callbacks
Audio frame listener interface. All methods have empty default implementations and can be overridden 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 | 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 |
AoqVideoFrameListener callbacks
Video frame listener interface. All methods have default implementations that return false, indicating no data modification. Each of the three callbacks includes trackType to distinguish Video and Screen tracks.
| Method | When triggered | Parameter |
|---|---|---|
| onCapturedVideoFrame | When a raw video frame is captured (before preprocessing) | trackType: track type; frame: AoqVideoFrameData |
| onPreEncodeVideoFrame | Video frame before encoding (after preprocessing) | trackType: track type; frame: AoqVideoFrameData |
| onRemoteVideoFrame | Remote video frame after decoding and before rendering | trackType: track type; frame: AoqVideoFrameData |
onCapturedVideoFrame
Called when a raw video frame is captured, before preprocessing.
| Parameter | Type | Description |
|---|---|---|
| trackType | AoqTrackType | Track type (Video/Screen) |
| frame | AoqVideoFrameData | 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 | AoqVideoFrameData | 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 | AoqVideoFrameData | Decoded remote video frame data |
Data types and enumerations
Common types
AoqRelayEndpoint
Relay endpoint.
| Field | Type | Default value | Description |
|---|---|---|---|
| routeIndex | int | -1 | Route index |
| endpoint | String | "" | Relay server domain name or IP address |
| port | int | 0 | Relay server UDP port |
| tcpPort | int | 0 | Relay server TCP port |
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. |
AoqTrackParam.trackMode
| Field | Type | Default | Description |
|---|---|---|---|
| trackMode | AoqTrackMode | AoqTrackModeSegment | Applies only to downstream audio. |
Field | Type | Default | Description |
|---|---|---|---|
workDir | String | "" | SDK working directory |
isBTScoMode | boolean | false | true: Bluetooth SCO mode; false: A2DP mode |
enableDumpAudio | boolean | false | Enable audio dump (for debugging) |
extras | String | "" | Extra parameters string |
| maxEncodedVideoFrameBytes | int | 190 × 1024 | Maximum encoded frame size in bytes. Applies only to the SDK internal JPEG encoder. |
| enableDropOversizedVideoFrame | boolean | false | For the SDK internal JPEG encoder, whether to drop a frame that remains oversized at the lowest quality. |
subscribeTracks must not include AoqTrackTypeScreen; otherwise, connect returns AoqECUnSupport without starting a connection. setRemoteView also returns AoqECUnSupport for Screen.
Field | Type | Default | Description |
|---|---|---|---|
token | String | "" | Authentication token |
sid | String | "" | Session ID |
certFingerprint | String | "" | Server certificate fingerprint |
relayEndpoints | List<AoqRelayEndpoint> | empty | List of Relay endpoints |
workspaceIdHash | String | "" | Workspace ID hash |
publishTracks | List<AoqTrackParam> | empty | Local tracks to publish |
subscribeTracks | List<AoqTrackParam> | empty | Remote tracks to subscribe to |
Statistics types
AoqNetworkStats
Field | Type | Description |
|---|---|---|
sendBitrate | int | Send bitrate (bps) |
sendBytes | long | Cumulative bytes sent |
recvBitrate | int | Receive bitrate (bps) |
recvBytes | long | Cumulative bytes received |
loss | int | Packet loss rate (0–100) |
rtt | int | Round-trip time (ms) |
AoqStats
Engine statistics. Reported periodically through onStats. All fields can be null.
| Field | Type | Description |
|---|---|---|
| audioPublishStats | AoqAudioPublishStats array | Audio publishing statistics array (@Nullable) |
| videoPublishStats | AoqVideoPublishStats array | Video publishing statistics array (@Nullable) |
| dataMsgPublishStats | AoqDataMsgPublishStats array | Data message publishing statistics array (@Nullable) |
| audioSubscribeStats | AoqAudioSubscribeStats array | Audio subscription statistics array (@Nullable) |
| videoSubscribeStats | AoqVideoSubscribeStats array | Video subscription statistics array (@Nullable) |
| dataMsgSubscribeStats | AoqDataMsgSubscribeStats array | Data message subscription statistics array (@Nullable) |
| networkStats | AoqNetworkStats | Network statistics (@Nullable) |
AoqAudioPublishStats
Audio publishing statistics.
| Field | Type | Default value | Description |
|---|---|---|---|
| trackType | AoqTrackType | AoqTrackTypeAudio | Track type |
| bitrate | int | 0 | Bitrate in bps |
| bytes | long | 0 | Total bytes sent |
| encodeVolume | int | 0 | Publishing encoding volume |
AoqVideoPublishStats
Video publishing statistics.
| Field | Type | Default value | Description |
|---|---|---|---|
| trackType | AoqTrackType | AoqTrackTypeVideo | Track type |
| bitrate | int | 0 | Bitrate in bps |
| bytes | long | 0 | Total bytes sent |
| encodeFps | int | 0 | Encoding frame rate |
AoqDataMsgPublishStats
Data message publishing statistics.
| Field | Type | Default value | Description |
|---|---|---|---|
| trackType | AoqTrackType | AoqTrackTypeData | Track type |
| bitrate | int | 0 | Bitrate in bps |
| bytes | long | 0 | Total bytes sent |
AoqAudioSubscribeStats
Audio subscription statistics.
| Field | Type | Default value | Description |
|---|---|---|---|
| trackType | AoqTrackType | AoqTrackTypeAudio | Track type |
| bitrate | int | 0 | Bitrate in bps |
| bytes | long | 0 | Total bytes received |
| playVolume | int | 0 | Playback volume |
AoqVideoSubscribeStats
Video subscription statistics.
| Field | Type | Default value | Description |
|---|---|---|---|
| trackType | AoqTrackType | AoqTrackTypeVideo | Track type |
| bitrate | int | 0 | Bitrate in bps |
| bytes | long | 0 | Total bytes received |
| decodeFps | int | 0 | Decoding frame rate |
| renderFps | int | 0 | Rendering frame rate |
AoqDataMsgSubscribeStats
Data message subscription statistics.
| Field | Type | Default value | Description |
|---|---|---|---|
| trackType | AoqTrackType | AoqTrackTypeData | Track type |
| bitrate | int | 0 | Bitrate in bps |
| bytes | long | 0 | Total bytes received |
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. |
Enum value | Value | Description |
|---|---|---|
AoqECOK | 0 | Success |
AoqECParamInvalid | 1 | Invalid parameter |
AoqECStateInvalid | 2 | Invalid state |
AoqECUnSupport | 3 | Not supported |
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 |
Enum value | Value | Description |
|---|---|---|
AoqWCOK | 0 | No warning |
AoqWCAudio | 100 | Audio generic warning |
AoqWCAudioHowling | 101 | Audio howling detected |
AoqWCAudioDevice | 120 | Audio device generic warning |
AoqWCAudioDeviceMicEnumerateError | 121 | Microphone enumeration error |
AoqWCAudioDeviceMicStartTimeout | 122 | Microphone start timeout |
AoqWCAudioDeviceRecordingError | 123 | Recording error |
AoqWCAudioDeviceSpeakerEnumerateError | 124 | Speaker enumeration error |
AoqWCAudioDeviceSpeakerStartTimeout | 125 | Speaker start timeout |
AoqWCAudioDevicePlayoutError | 126 | Playback error |
AoqWCVideo | 200 | Video generic warning |
AoqWCVideoCameraEnumerateError | 201 | Camera enumeration error |
AoqWCVideoEncoderSwitched | 202 | Video encoder switched |
AoqWCVideoRenderDowngrade | 203 | Video rendering downgraded |
Enum value | Value | Description |
|---|---|---|
AoqTrackTypeAudio | 0 | Audio track |
AoqTrackTypeVideo | 1 | Video track |
AoqTrackTypeData | 2 | Data messaging track |
| AoqTrackTypeScreen | 3 | Screen sharing track. Uplink only. |
Enum value | Value | Description |
|---|---|---|
AoqEncoderTypeUnknown | 0 | Unknown format |
AoqEncoderTypeAudioPCM | 1 | Audio PCM |
AoqEncoderTypeAudioOpus | 2 | Audio Opus |
AoqEncoderTypeVideoH264 | 3 | Video H.264 |
AoqEncoderTypeVideoJpeg | 4 | Video JPEG |
AoqEncoderTypeDataText | 5 | Data text |
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
AoqAudioCaptureConfig
Field | Type | Default | Description |
|---|---|---|---|
isExternal | boolean | false | Whether to use external capture mode |
isVoipMode | boolean | false | Whether to enable VoIP mode (affects device routing, e.g., earpiece) |
channel | int | 1 | Channel count (default: mono) |
Field | Type | Default | Description |
|---|---|---|---|
isVoipMode | boolean | false | Whether to enable VoIP mode (hardware AEC); applies to mobile |
isDefaultSpeaker | boolean | true | Whether to default to the speaker; applies to mobile |
isExternal | boolean | false | Whether to use external playback mode |
channel | int | 1 | Channel count (default: mono) |
Field | Type | Default | Description |
|---|---|---|---|
trackType | AoqTrackType | Audio | Track type |
codecType | AoqEncoderType | AudioOpus | Codec format |
sampleRate | int | 48000 | Sample rate (Hz) |
channel | int | 1 | Channel count |
bitrate | int | 32000 | Bitrate (bps) |
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 | int | 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 | String | "" | File name including its path. Must not be empty. |
| cycles | int | -1 | Loop count. -1 loops indefinitely. |
| startPosMs | long | 0 | Initial playback position in milliseconds |
| publishVolume | int | 100 | Publishing volume. Valid values: 0-100. |
| playoutVolume | int | 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 | String | "" | File identifier |
| stateCode | AoqAudioFileStateCode | AoqAudioFileNone | File playback state code |
| errorCode | AoqAudioFileErrorCode | AoqAudioFileNoError | File error code |
External audio stream and volume types
AoqAudioExternalStreamToggle
External audio stream toggle states.
| Enum value | Value | Description |
|---|---|---|
| AoqAudioExternalStreamToggleNormal | 0 | Normal state |
| AoqAudioExternalStreamTogglePause | 1 | Paused state |
AoqAudioFrameData
External audio frame data.
| Field | Type | Default value | Description |
|---|---|---|---|
| dataPtr | byte array | null | Raw PCM audio data (@Nullable) |
| dataSize | int | 0 | PCM data size in bytes |
| numOfSamples | int | 0 | Number of samples per channel |
| bytesPerSample | int | 0 | Bytes per sample |
| numOfChannels | int | 0 | Number of channels |
| samplesPerSec | int | 0 | Samples per second (sample rate) |
| pushSequence | int | 0 | PCM input round |
| timeStamp | long | 0 | Timestamp |
| autoGenMute | boolean | false | Valid in data callbacks. true 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 | int | 48000 | Callback audio sample rate in Hz |
| channels | int | 1 | Callback audio channel count |
| mode | AoqAudioObserverMode | AoqAudioObserverModeReadOnly | Read-write mode |
AoqAudioVolumeIndicationConfig
| Field | Type | Default | Description |
|---|---|---|---|
| reportSpeech | boolean | false | Whether to detect speech. |
| interval | int | 0 | Callback interval in milliseconds. Values of 0 or less disable callbacks; values between 0 and 10 use 10. |
| smooth | int | 3 | Smoothing factor, from 0 to 10. Higher values produce smoother results. |
AoqAudioVolume
| Field | Type | Default | Description |
|---|---|---|---|
| isSpeech | boolean | false | Whether speech is detected. |
| volume | int | 0 | Smoothed instantaneous volume, from 0 to 255. |
Video types
AoqRenderMode
Rendering modes.
| Enum value | Value | Description |
|---|---|---|
| AoqRenderModeAuto | 0 | Automatic mode |
| AoqRenderModeStretch | 1 | Stretch mode |
| AoqRenderModeFill | 2 | Fill mode |
| AoqRenderModeCrop | 3 | Crop mode |
AoqVideoCanvas
Video rendering canvas.
| Field | Type | Default value | Description |
|---|---|---|---|
| view | View | null | Android View used for rendering (@Nullable) |
| renderMode | AoqRenderMode | AoqRenderModeAuto | Rendering mode |
AoqCameraDirection
Camera direction.
| Enum value | Value | Description |
|---|---|---|
| AoqCameraDirectionFront | 0 | Front camera |
| AoqCameraDirectionBack | 1 | Rear camera |
AoqScreenCaptureConfig
| Field | Type | Default | Description |
|---|---|---|---|
| isExternal | boolean | false | Whether the application supplies raw screen frames. |
| mediaProjectionIntent | Intent | null | Pass an existing MediaProjection permission intent, or null to let the SDK request permission. Ignored for external capture. |
| notificationFactory | AoqScreenShareNotificationFactory | null | Foreground service notification factory. Null uses the default notification. Ignored for external capture. |
Field | Type | Default | Description |
|---|---|---|---|
width | int | 1280 | Capture width (pixels); ignored when |
height | int | 720 | Capture height (pixels); ignored when |
fps | int | 15 | Capture frame rate; ignored when |
isExternal | boolean | false | External capture mode; when true, the camera is not opened |
cameraDirection | AoqCameraDirection | Front | Camera direction; ignored when |
Field | Type | Default | Description |
|---|---|---|---|
trackType | AoqTrackType | Video | Track type |
codecType | AoqEncoderType | VideoH264 | Codec format |
width | int | 540 | Encoding width (pixels) |
height | int | 960 | Encoding height (pixels) |
fps | int | 5 | Encoding frame rate |
bitrate | int | 500000 | Target bitrate (bps) |
minBitrate | int | 128000 | Minimum bitrate (bps) |
keyframeInterval | int | 2 | Keyframe interval (seconds) |
mirrorMode | AoqMirrorMode | Disabled | Mirror mode |
orientationMode | AoqOrientationMode | Auto | Video orientation mode |
isExternal | boolean | false | When true, the SDK skips re-encoding; use |
Enum value | Value | Description |
|---|---|---|
AoqVideoPixelFormatUnknown | 0 | Unknown format |
AoqVideoPixelFormatI420 | 1 | I420 (YUV planar) |
AoqVideoPixelFormatNV12 | 2 | NV12 (YUV semi-planar) |
AoqVideoPixelFormatNV21 | 3 | NV21 (YUV semi-planar) |
AoqVideoPixelFormatBGRA | 4 | BGRA 32-bit |
AoqVideoPixelFormatRGBA | 5 | RGBA 32-bit |
AoqVideoPixelFormatTextureOES | 7 | External OES texture |
AoqVideoPixelFormatTexture2D | 8 | Standard 2D texture |
AoqVideoFrame
External video data.
| Field | Type | Default value | Description |
|---|---|---|---|
| format | AoqVideoPixelFormat | AoqVideoPixelFormatUnknown | Pixel format |
| width | int | 0 | Video width in pixels |
| height | int | 0 | Video height in pixels |
| data | byte array | null | Packed-format data (NV12/NV21/BGRA/RGBA) (@Nullable) |
| dataY | byte array | null | I420 Y plane data (@Nullable) |
| dataU | byte array | null | I420 U plane data (@Nullable) |
| dataV | byte array | null | I420 V plane data (@Nullable) |
| strideY | int | 0 | Y plane stride |
| strideU | int | 0 | U plane stride |
| strideV | int | 0 | V plane stride |
| textureId | int | 0 | Texture ID (valid for TEXTURE_OES/TEXTURE_2D) |
| transformMatrix | float array | null | 4×4 row-major texture transformation matrix (@Nullable) |
| eglContext | EGLContext | null | Shared EGL context (@Nullable) |
| timeStamp | long | 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 | byte array | null | Encoded data (@Nullable) |
| width | int | 0 | Width in pixels |
| height | int | 0 | Height in pixels |
| timeStamp | long | 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 | Capture starting |
| AoqVideoDeviceCaptureStarted | 2 | Capture started |
| AoqVideoDeviceCaptureStopping | 3 | Capture stopping |
| AoqVideoDeviceCaptureStopped | 4 | Capture stopped |
| AoqVideoDeviceCaptureFail | 5 | Capture failed |
AoqVideoDeviceState
Video device capture state.
| Field | Type | Default value | Description |
|---|---|---|---|
| state | AoqVideoDeviceStateCode | AoqVideoDeviceNone | Device capture state |
| reason | int | 0 | Error reason code (see AoqErrorCode) |
Field | Type | Default | Description |
|---|---|---|---|
trackType | AoqTrackType | Audio | Audio track type |
codecType | AoqEncoderType | AudioPCM | Audio stream format |
channels | int | 1 | Channel count |
sampleRate | int | 48000 | Sample rate (Hz) |
playoutVolume | int | 100 | Playback volume [0–100] |
publishVolume | int | 100 | Publishing volume [0–100] |
maxBufferDuration | int | 1000 | Maximum buffer duration (milliseconds) |
enable3A | boolean | false | Whether to apply 3A processing to input PCM |
Enum value | Value | Description |
|---|---|---|
AoqAudioStreamPublish | 0 | Publish stream (send) |
AoqAudioStreamPlayout | 1 | Playout stream (receive) |
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 |
AoqScreenCaptureState
| Field | Type | Default | Description |
|---|---|---|---|
| state | AoqScreenCaptureStateCode | AoqScreenCaptureNone | Screen capture state. |
| reason | int | 0 | 0 for normal states; an AoqErrorCode on failure. |
AoqScreenShareNotificationFactory
createNotificationChannel before returning a custom notification; otherwise, the foreground service fails to start.
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 supports read-write access. |
| mirrorApplied | boolean | false | Whether to mirror callback data |
AoqVideoFrameData
Video frame callback data. The byte/texture fields reference internal SDK memory and are valid only during the callback. Make a copy for asynchronous use.
| Field | Type | Default value | Description |
|---|---|---|---|
| format | AoqVideoPixelFormat | AoqVideoPixelFormatUnknown | Pixel format |
| width | int | 0 | Width in pixels |
| height | int | 0 | Height in pixels |
| data | ByteBuffer | null | Packed-format data (NV12/NV21/BGRA/RGBA). The direct ByteBuffer references native memory (@Nullable). |
| dataY | ByteBuffer | null | I420 Y plane (@Nullable) |
| dataU | ByteBuffer | null | I420 U plane (@Nullable) |
| dataV | ByteBuffer | null | I420 V plane (@Nullable) |
| strideY | int | 0 | Y plane stride |
| strideU | int | 0 | U plane stride |
| strideV | int | 0 | V plane stride |
| textureId | int | 0 | Texture ID (valid for TEXTURE_OES/TEXTURE_2D) |
| transformMatrix | float array | null | 4×4 row-major texture transformation matrix (valid for TEXTURE_OES/TEXTURE_2D) (@Nullable) |
| timeStamp | long | 0 | Timestamp in milliseconds |
Data message types
AoqDataMsg
Field | Type | Default | Description |
|---|---|---|---|
data | byte[] | new byte[0] | Message data (byte array) |