Skip to main content
AOQ SDK

AOQ Client SDK Linux C++ API reference

This topic describes the C++ APIs, callbacks, and data types of AOQ Client SDK for Linux.

The AOQ SDK provides generic video APIs. Qwen-Audio-Realtime does not support video input or output. For the media capabilities of other models, see their access documentation.

API index

Engine lifecycle

APIDescription
createEngineCreate an engine instance (static singleton method)
destroyDestroy the engine instance (static method)
getVersionGet the SDK version (static method)
connectConnect to the Relay server
disconnectDisconnect from the server

Audio device management

APIDescription
startAudioCaptureOpen the audio capture device (no-op on Linux)
stopAudioCaptureClose the audio capture device (no effect on Linux)
muteAudioCaptureMute or unmute audio capture
startAudioPlayerStart audio rendering (no-op on Linux)
stopAudioPlayerStop audio rendering (no effect on Linux)
pauseAudioPlayerPause audio rendering, with optional fade-out
resumeAudioPlayerResume audio rendering, with optional fade-in
interruptAudioPlayerInterrupt the current audio playback

Audio codec configuration

APIDescription
setAudioEncoderConfigSet audio encoding parameters
setAudioDecoderConfigSet audio decoding parameters

Video device management

APIDescription
startVideoCaptureOpen the video capture device (Linux supports external capture only)
stopVideoCaptureClose the video capture device
setLocalViewSet or remove the local video rendering window (no renderer on Linux)
setRemoteViewSet or remove the remote video rendering window (no renderer on Linux)

Video codec configuration and external input

APIDescription
setVideoEncoderConfigSet video encoding parameters
setVideoDecoderConfigSet video decoding parameters (subscriber codec proposal)
pushExternalVideoCapturedFramePush externally captured video frames
pushExternalVideoEncodedFramePush externally encoded video frames

Screen capture

APIDescription
startScreenCaptureStart screen capture
stopScreenCaptureStop screen capture

Media stream transmission control

APIDescription
enableSendMediaStreamEnable or disable local media stream transmission

Audio file playback

APIDescription
startAudioFileStart playing and publishing a local audio file
stopAudioFileStop audio file playback
pauseAudioFilePause audio file playback
resumeAudioFileResume audio file playback
getAudioFileDurationGet the total duration of the audio file
getAudioFileCurrentPositionGet the current playback position of the audio file
setAudioFilePositionMillisSeek to a position in the audio file
setAudioFileVolumeSet the audio file volume
getAudioFileVolumeGet the current audio file volume

External audio streams

APIDescription
addAudioExternalStreamAdd an external audio stream
pushAudioExternalStreamDataPush external PCM audio data
setAudioExternalStreamVolumeSet the external audio stream volume
getAudioExternalStreamVolumeGet the external audio stream volume
clearAudioExternalStreamBufferClear the external audio stream buffer
removeAudioExternalStreamRemove an external audio stream

Real-time messages

APIDescription
sendDataMsgSend a real-time data message

Audio frame callbacks

APIDescription
setAudioFrameObserverRegister the audio frame listener (pure virtual)
enableAudioFrameObserverEnable or disable audio frame callbacks at a specified stage (pure virtual)

Local audio volume indication

APIDescription
enableLocalAudioVolumeIndicationEnable or disable local capture volume indication callbacks

Video frame callbacks

APIDescription
setVideoFrameObserverRegister the video frame listener (pure virtual)
enableVideoFrameObserverEnable or disable video frame callbacks at a specified stage (pure virtual)

AoqEngineEventListener callbacks

APIDescription
onErrorEngine error callback
onWarningEngine warning callback
onConnectionStatusChangeConnection status change callback
onStatsEngine statistics callback
onAudioDeviceStateChangedAudio device operation status change callback
onAudioDeviceRouteChangedAudio output route change callback (not triggered on Linux)
onAudioFileStateAudio file playback status callback
onLocalAudioVolumeIndicationLocal capture volume indication callback
onVideoDeviceStateChangedVideo device operation status change callback
onDataMsgReceived real-time data message callback

IAudioFrameObserver callbacks

APIDescription
onCapturedAudioFrameCalled when a raw audio frame is captured. The frame contains unprocessed PCM data.
onProcessCapturedAudioFrameCalled for an audio frame after 3A (AEC/AGC/ANS) processing.
onPublishAudioFrameCalled for an audio frame before publishing, immediately before encoding and transmission.
onPlaybackAudioFrameCalled for a decoded remote audio frame before playback.

IVideoFrameObserver callbacks

APIDescription
onCapturedVideoFrameCalled when a raw video frame is captured. The frame has not yet been preprocessed.
onPreEncodeVideoFrameCalled for a raw video frame after preprocessing and before encoding.
onRemoteVideoFrameCalled for a raw remote video frame after decoding and before rendering.

API details

Engine lifecycle

createEngine

Creates the engine instance. The SDK holds the engine as a global singleton, so calling this method again returns the existing instance.
static AoqClientEngine* createEngine(const AoqCreateConfig& config,
                                    AoqEngineEventListener* listener);
ParametersTypeDescription
configAoqCreateConfigEngine creation configuration
listenerAoqEngineEventListener\*Engine event callback listener, which the caller implements by inheritance
Returns: A pointer to the engine instance. nullptr is returned on failure. The lifecycle of the listener must outlast that of the engine.

destroy

Destroys the engine instance and releases all resources.
static int destroy();
Returns: 0 indicates success; a non-0 value indicates a failure.

getVersion

Gets the current SDK version.
static const char* getVersion();
Returns: The version string, which is held by the SDK.

connect

Connects to the relay server. The application server obtains temporary AOQ connection parameters based on the protocol in use and sends them to the client. For more information, see Token authentication.
virtual int connect(const AoqConnectConfig& config);
ParametersTypeDescription
configAoqConnectConfigConnection configuration, which includes the token, SID, the array of relay access points, and the arrays of publishing and subscribing tracks
Returns: 0 indicates success and the operation runs asynchronously; non-0 indicates a failure. The connection result is notified by onConnectionStatusChange.
relayEndpoints / publishTracks / subscribeTracks are all "C-style array pointer + length" structures. The memory is held by the caller and only needs to be valid during the connect call.

disconnect

Disconnects from the server and releases the resources associated with the connection.
virtual int disconnect();
Returns: 0 indicates success; a non-0 value indicates a failure.

Audio device management

virtual int startAudioCapture(const AoqAudioCaptureConfig& config);
virtual int stopAudioCapture();
virtual int muteAudioCapture(bool mute);
virtual int startAudioPlayer(const AoqAudioPlaybackConfig& config);
virtual int stopAudioPlayer();
virtual int pauseAudioPlayer(int fadeMs);
virtual int resumeAudioPlayer(int fadeMs);
virtual int interruptAudioPlayer(AoqTrackType trackType, int fadeMs);
ParametersTypeDescription
configAoqAudioCaptureConfig / AoqAudioPlaybackConfigCapture and playback configuration
mutebooltrue mutes; false unmutes
fadeMsintFade-out or fade-in duration, in milliseconds. 0 indicates immediate execution.
trackTypeAoqTrackTypeTrack type
Important constraint on Linux: startAudioCapture / startAudioPlayer have empty implementations in the Linux build (they return 0 directly and do not open any sound card device), and stopAudioCapture / stopAudioPlayer have no actual effect because the internal state is not set. On Linux, use external audio streams (2.8) for audio input, and use audio frame callbacks (2.10) to play audio output yourself.

Audio codec configuration

virtual int setAudioEncoderConfig(const AoqAudioCodecConfig& config);
virtual int setAudioDecoderConfig(const AoqAudioCodecConfig& config);
We recommend that you call this method before connect(). An invalid combination of the sample rate and the mode triggers the onError callback with AoqECParamInvalid during connect.

Video device management

virtual int startVideoCapture(const AoqVideoCaptureConfig& config);
virtual int stopVideoCapture();
virtual int setLocalView(AoqTrackType trackType, const AoqVideoCanvas& canvas);
virtual int setRemoteView(AoqTrackType trackType, const AoqVideoCanvas& canvas);
ParameterTypeDescription
configAoqVideoCaptureConfigVideo capture configuration
trackTypeAoqTrackTypeVideo track type
canvasAoqVideoCanvasRendering canvas. If canvas.view == nullptr, the binding is removed.
Important constraint on Linux: Camera capture on Linux is a placeholder implementation and does not produce frames. Use startVideoCapture({.isExternal = true}) + pushExternalVideoCapturedFrame to deliver frames. setLocalView / setRemoteView have no rendering backend on Linux. For preview, render it yourself through the video frame callback (2.12).

Video codec configuration and external input

virtual int setVideoEncoderConfig(const AoqVideoCodecConfig& config);
virtual int setVideoDecoderConfig(const AoqVideoCodecConfig& config);
virtual int pushExternalVideoCapturedFrame(AoqTrackType trackType, const AoqVideoFrame& frame);
virtual int pushExternalVideoEncodedFrame(AoqTrackType trackType, const AoqVideoEncodedFrame& frame);
ParameterTypeDescription
configAoqVideoCodecConfigCodec configuration, which is routed based on config.trackType
trackTypeAoqTrackTypeRouting target. Set it to AoqTrackTypeVideo or AoqTrackTypeScreen.
frameAoqVideoFrame / AoqVideoEncodedFrameRaw frame or encoded frame data
  • setVideoDecoderConfig is a codec proposal for the subscribing side and must be called before connect. During decoding, only trackType/codecType/width/height/fps/bitrate take effect.
  • pushExternalVideoCapturedFrame requires startVideoCapture(isExternal=true) for Video or startScreenCapture(isExternal=true) for Screen first. It returns AoqECVideoExternalCaptureNotEnabled(211) when external capture is not started, AoqECParamInvalid when the format is not supported, and AoqECVideoExternalBufferFull(210) when the buffer is full.
  • pushExternalVideoEncodedFrame requires setVideoEncoderConfig(isExternal=true) first. The SDK packages and sends the frame directly without re-encoding. Only JPEG is currently supported.
  • When frame.timeStamp is 0, the SDK fills it in with the local time.

Screen capture

virtual int startScreenCapture(const AoqScreenCaptureConfig& config);
virtual int stopScreenCapture();
config specifies screen capture settings. Screen content is sent on the AoqTrackTypeScreen track. Returns 0 on success or a nonzero value on failure. These methods return synchronously and do not provide an onScreenCaptureStateChanged callback. Linux supports external raw frame input only. Set isExternal=true. Internal screen capture and source enumeration are not supported; sourceId and sourceType do not exist in the Linux configuration. 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

virtual int enableSendMediaStream(AoqTrackType trackType, bool enable);
Specifies whether to send a specific local media stream. trackType can be AoqTrackTypeAudio or AoqTrackTypeVideo or AoqTrackTypeScreen. A return value of 0 indicates that the call is dispatched and runs asynchronously. We recommend that you disable sending after initialization and enable it only after onConnectionStatusChange reports AoqConnectionStatusConnected.

Audio file playback

virtual int startAudioFile(const char* fileId, const AoqAudioFileMixConfig& config);
virtual int stopAudioFile(const char* fileId);
virtual int pauseAudioFile(const char* fileId);
virtual int resumeAudioFile(const char* fileId);
virtual int64_t getAudioFileDuration(const char* fileId);
virtual int64_t getAudioFileCurrentPosition(const char* fileId);
virtual int setAudioFilePositionMillis(const char* fileId, int64_t positionMillis);
virtual int setAudioFileVolume(const char* fileId, AoqAudioStreamDirection type, int volume);
virtual int getAudioFileVolume(const char* fileId, AoqAudioStreamDirection type);
ParameterTypeDescription
fileIdconst char\*Audio file ID. The business layer must ensure global uniqueness.
configAoqAudioFileMixConfigFile mixing configuration
positionMillisint64_tTarget playback position, in milliseconds
typeAoqAudioStreamDirectionPublishing volume or local playback volume
volumeintVolume. Valid values: 0 to 100.
Description of the return value:
  • getAudioFileDuration / getAudioFileCurrentPosition: A value >=0 is the value in milliseconds; a value <0 indicates a failure, and its absolute value is -AoqErrorCode.
  • getAudioFileVolume: A value from 0-100 is the volume; a value <0 indicates a failure, and its absolute value is -AoqErrorCode.
Playback state changes are reported through the onAudioFileState callback. File mixing uses the publishing path and does not depend on the local sound card. Therefore, on Linux, you can use it to push a local file as the audio source.

External audio streams

virtual int addAudioExternalStream(const char* streamId, const AoqAudioExternalStreamConfig& config);
virtual int pushAudioExternalStreamData(const char* streamId, AoqAudioFrameData& data);
virtual int setAudioExternalStreamVolume(const char* streamId, AoqAudioStreamDirection type, int vol);
virtual int getAudioExternalStreamVolume(const char* streamId, AoqAudioStreamDirection type);
virtual void clearAudioExternalStreamBuffer(const char* streamId, int fadeoutMs);
virtual int removeAudioExternalStream(const char* streamId);
ParameterTypeDescription
streamIdconst char\*External audio stream ID. The business layer must ensure global uniqueness.
configAoqAudioExternalStreamConfigExternal audio stream configuration
dataAoqAudioFrameDataRaw external audio data (PCM), as a non-const reference
typeAoqAudioStreamDirectionPublishing volume or local playback volume
volintVolume. Valid values: 0 to 100.
fadeoutMsintFade-out duration. -1 uses the SDK default fade-out, 0 clears the buffer with no fade-out, and a value greater than 0 keeps the specified fade-out duration in milliseconds.
  • When pushAudioExternalStreamData returns AoqECAudioExternalBufferFull(110), the SDK's internal buffer is full. We recommend that you wait 20 ms and then send the current data frame again.
  • Best practice: In real-time capture scenarios, push 10 ms of data at a time and push whenever data is available. In file source scenarios, push 40 ms of data at a time at 30 ms intervals, and handle the AoqECAudioExternalBufferFull return value.
  • getAudioExternalStreamVolume: A value from 0-100 is the volume; a value <0 indicates a failure, and its absolute value is -AoqErrorCode.
  • clearAudioExternalStreamBuffer returns void and has no return value.
  • data.pushSequence is used for the SDK's consumption completion notification (PCM input round).
There is no real capture device on Linux. This group of APIs is the main path for the audio uplink.

Real-time messages

virtual int sendDataMsg(const AoqDataMsg& msg);
Sends a real-time data message. msg.data points to memory held by the caller and only needs to be valid during the call. Messages from the peer are reported through the onDataMsg callback.

Audio frame callbacks

virtual int setAudioFrameObserver(IAudioFrameObserver* observer) = 0;
virtual int enableAudioFrameObserver(bool enabled, AoqAudioSource audioSource,
                                     const AoqAudioObserverConfig& config) = 0;
ParametersTypeDescription
observerIAudioFrameObserver\*Listener instance. Pass nullptr to stop callbacks.
enabledboolSpecifies whether to enable data callbacks at this position
audioSourceAoqAudioSourcePosition of the raw audio data source
configAoqAudioObserverConfigCallback sample rate, number of channels, and read-write mode
Usage: First, call setAudioFrameObserver(observer) to register the listener. Then, call enableAudioFrameObserver for each position that you need. The lifecycle of the observer must cover the entire callback period. Release the observer only after you unregister it. Read-write mode support (see the IAudioFrameObserver declaration): onCapturedAudioFrame / onProcessCapturedAudioFrame / onPlaybackAudioFrame support read-write mode, whereas onPublishAudioFrame supports only read-only mode.
On Linux, setAudioFrameObserver completes registration through asynchronous dispatch (PostTask to the control thread), so the callback may take effect slightly after the call returns. Before releasing the observer, leave a sufficient safety interval or keep the object alive.

Local audio volume indication

virtual int enableLocalAudioVolumeIndication(const AoqAudioVolumeIndicationConfig& config);
Enables or disables local capture volume indication. If config.interval <= 0, the callback is disabled. After it is enabled, onLocalAudioVolumeIndication is triggered at the interval specified by config.interval. You must call this method after startAudioCapture to obtain volume data.
There is no device capture on Linux. The volume data in this callback comes from the publishing/playback mixing path (mixer).

Video frame callbacks

virtual int setVideoFrameObserver(IVideoFrameObserver* observer) = 0;
virtual int enableVideoFrameObserver(bool enabled, AoqVideoSource videoSource,
                                     const AoqVideoObserverConfig& config) = 0;
ParametersTypeDescription
observerIVideoFrameObserver\*Listener instance. Pass nullptr to stop callbacks.
enabledboolSpecifies whether to enable data callbacks at this position
videoSourceAoqVideoSourceData source of the video frame callback (position in the pipeline)
configAoqVideoObserverConfigExpected pixel format, alignment policy, read-write mode, and mirroring
If the callback returns true, the data is modified and must be written back to the SDK. This takes effect only for I420 / CVPixelBuffer, which means only I420 on Linux. If the callback returns false, the data is read-only.
Linux has no built-in rendering. This group of callbacks is the only way to obtain the remote video image (AoqVideoSourceRemote).

AoqEngineEventListener callbacks

AoqEngineEventListener is the unified entry point for all asynchronous event notifications from the SDK. You inherit and implement it, and then pass it in when you call createEngine.
All callbacks in this class are pure virtual functions (= 0) with no default empty implementation. On Linux, you must fully implement the following 10 methods; otherwise, the derived class cannot be instantiated. Callbacks may be triggered on internal SDK threads.
class AOQ_API AoqEngineEventListener {
public:
    AoqEngineEventListener();
    virtual ~AoqEngineEventListener();

    virtual void onError(int code, const char* message) = 0;
    virtual void onWarning(int code, const char* message) = 0;
    virtual void onConnectionStatusChange(AoqConnectionStatus status) = 0;
    virtual void onStats(const AoqStats& stats) = 0;
    virtual void onAudioDeviceStateChanged(const AoqAudioDeviceState& state) = 0;
    virtual void onAudioDeviceRouteChanged(int routeType) = 0;
    virtual void onAudioFileState(const AoqAudioFileState& state) = 0;
    virtual void onLocalAudioVolumeIndication(const AoqAudioVolume& volume) = 0;
    virtual void onVideoDeviceStateChanged(const AoqVideoDeviceState& state) = 0;
    virtual void onDataMsg(const AoqDataMsg& msg) = 0;
};

AoqEngineEventListener callbacks

onError

Engine error callback. code corresponds to an AoqErrorCode enum value (see 3.3), and message is valid only during the callback.

onWarning

Engine warning callback. code corresponds to an AoqWarningCode enum value (see 3.3).

onConnectionStatusChange

Connection status change callback. State transitions: Disconnected -> Connecting -> Connected / Failed -> Disconnected.

onStats

Engine statistics callback. The SDK periodically reports publishing and subscribing statistics for audio and video and network statistics, which you can use to monitor call quality and network status in real time and to diagnose audio and video issues.
ParametersTypeDescription
statsAoqStatsPublishing and subscribing statistics and network statistics for audio, video, and data messages
AoqStats internally uses an "array pointer + count" structure. The pointer is valid only during the callback, so you must copy the data yourself for asynchronous use.

onAudioDeviceStateChanged

Callback for audio device capture and playback operation status changes. state.reason is an AoqErrorCode value.

onAudioDeviceRouteChanged

Audio output route change callback. routeType corresponds to an AoqAudioDeviceRouteType enum value (see 3.4).
Not triggered on Linux: The Linux build does not include the platform device listener, and server-side audio devices do not generate route events. You must still implement this method (pure virtual), but the implementation can be empty.

onAudioFileState

Callback for audio file playback status. state.fileId is valid only during the callback.

onLocalAudioVolumeIndication

Local capture volume indication callback. To enable it, call enableLocalAudioVolumeIndication.

onVideoDeviceStateChanged

Callback for video device capture operation status changes. state.reason is an AoqErrorCode value.

onDataMsg

Callback for a received real-time data message. msg.datais guaranteed to be valid only during the callback. If you need to use it asynchronously, copy it yourself.

IAudioFrameObserver callbacks

Interface for audio data listening. Do not perform any time-consuming operations in the callbacks. Otherwise, audio anomalies may occur. All methods are pure virtual functions and must be fully implemented.
class AOQ_API IAudioFrameObserver {
public:
    virtual ~IAudioFrameObserver() {}
    virtual void onCapturedAudioFrame(const AoqAudioFrameData& data) = 0;
    virtual void onProcessCapturedAudioFrame(const AoqAudioFrameData& data) = 0;
    virtual void onPublishAudioFrame(AoqTrackType trackType, const AoqAudioFrameData& data) = 0;
    virtual void onPlaybackAudioFrame(const AoqAudioFrameData& data) = 0;
};
CallbackHow to enable it (audioSource)Read-write mode
onCapturedAudioFrameAoqAudioSourceCapturedRead-write supported
onProcessCapturedAudioFrameAoqAudioSourceProcessCapturedRead-write supported
onPublishAudioFrameAoqAudioSourcePublish (requires a successful connect)Only read-only is supported
onPlaybackAudioFrameAoqAudioSourcePlaybackRead-write supported
All the preceding callbacks support setting the sample rate and the number of channels by using AoqAudioObserverConfig.
On Linux, onPlaybackAudioFrame is the main path for obtaining the remote downlink PCM. Because the 3A module is not compiled on Linux, the data from onProcessCapturedAudioFrame (data after 3A processing) is essentially the same as the raw captured data.

onCapturedAudioFrame

Called when a raw audio frame is captured. The frame contains unprocessed PCM data.
virtual void onCapturedAudioFrame(const AoqAudioFrameData& data) = 0;
ParameterTypeDescription
dataconst AoqAudioFrameData&Captured audio frame data
Return value: None (void).
Pointers in data are valid only during the callback. Copy the data before using it asynchronously. Linux has no internal capture device; this callback receives data from external audio streams or the mixing pipeline.

onProcessCapturedAudioFrame

Called for an audio frame after 3A (AEC/AGC/ANS) processing.
virtual void onProcessCapturedAudioFrame(const AoqAudioFrameData& data) = 0;
ParameterTypeDescription
dataconst AoqAudioFrameData&Audio frame data after 3A processing
Return value: None (void).
Pointers in data are valid only during the callback. Copy the data before using it asynchronously. The 3A module is not compiled on Linux, so the data does not materially differ from the raw captured data.

onPublishAudioFrame

Called for an audio frame before publishing, immediately before encoding and transmission.
virtual void onPublishAudioFrame(AoqTrackType trackType, const AoqAudioFrameData& data) = 0;
ParameterTypeDescription
trackTypeAoqTrackTypeAudio track type
dataconst AoqAudioFrameData&Audio frame data before publishing
Return value: None (void).
Pointers in data are valid only during the callback. Copy the data before using it asynchronously. This callback supports read-only access only.

onPlaybackAudioFrame

Called for a decoded remote audio frame before playback.
virtual void onPlaybackAudioFrame(const AoqAudioFrameData& data) = 0;
ParameterTypeDescription
dataconst AoqAudioFrameData&Remote audio frame data before playback
Return value: None (void).
Pointers in data are valid only during the callback. Copy the data before using it asynchronously. On Linux, this callback is the primary way to obtain remote downstream PCM data.

IVideoFrameObserver callbacks

Interface for video data listening. Do not perform any time-consuming operations in the callbacks. Otherwise, video stuttering may occur. All methods are pure virtual functions.
class AOQ_API IVideoFrameObserver {
public:
    virtual ~IVideoFrameObserver() {}
    virtual bool onCapturedVideoFrame(AoqTrackType trackType, AoqVideoFrame& frame) = 0;
    virtual bool onPreEncodeVideoFrame(AoqTrackType trackType, AoqVideoFrame& frame) = 0;
    virtual bool onRemoteVideoFrame(AoqTrackType trackType, AoqVideoFrame& frame) = 0;
};
CallbackHow to enable it (videoSource)Description
onCapturedVideoFrameAoqVideoSourceCapturedLocal raw data after capture, before preprocessing
onPreEncodeVideoFrameAoqVideoSourcePreEncodeLocal raw data before encoding, after preprocessing
onRemoteVideoFrameAoqVideoSourceRemoteRemote raw data after decoding and before rendering
Returns: true indicates that the data is modified and must be written back to the SDK, which takes effect only for I420 / CVPixelBuffer; false indicates read-only. The pointers in frame are valid only during the callback. To use them asynchronously, copy them yourself.

onCapturedVideoFrame

Called when a raw video frame is captured. The frame has not yet been preprocessed.
virtual bool onCapturedVideoFrame(AoqTrackType trackType, AoqVideoFrame& frame) = 0;
ParameterTypeDescription
trackTypeAoqTrackTypeFrame track (Video / Screen)
frameAoqVideoFrame&Captured video frame data
Return value: true indicates that modified data must be written back to the SDK (supported only for I420/CVPixelBuffer). false indicates read-only access.
Pointers in frame are valid only during the callback. Copy the data before using it asynchronously.

onPreEncodeVideoFrame

Called for a raw video frame after preprocessing and before encoding.
virtual bool onPreEncodeVideoFrame(AoqTrackType trackType, AoqVideoFrame& frame) = 0;
ParameterTypeDescription
trackTypeAoqTrackTypeFrame track (Video / Screen)
frameAoqVideoFrame&Video frame data before encoding
Return value: true indicates that modified data must be written back to the SDK (supported only for I420/CVPixelBuffer). false indicates read-only access.
Pointers in frame are valid only during the callback. Copy the data before using it asynchronously.

onRemoteVideoFrame

Called for a raw remote video frame after decoding and before rendering.
virtual bool onRemoteVideoFrame(AoqTrackType trackType, AoqVideoFrame& frame) = 0;
ParameterTypeDescription
trackTypeAoqTrackTypeFrame track (Video / Screen)
frameAoqVideoFrame&Decoded remote video frame data
Return value: true indicates that modified data must be written back to the SDK (supported only for I420/CVPixelBuffer). false indicates read-only access.
Pointers in frame are valid only during the callback. Copy the data before using it asynchronously. Linux has no built-in renderer; this callback is the only way to obtain remote video frames.

Data types and enumerations

Common types

AoqCreateConfig

FieldTypeDefault valueDescription
workDirconst char\*nullptrSDK working directory (for logs and temporary files)
enableDumpAudioboolfalseSpecifies whether to save audio data (for debugging)
extrasconst char\*nullptrExtended parameters (a JSON string)
maxEncodedVideoFrameBytesint190 × 1024Maximum encoded frame size in bytes. Applies only to the SDK internal JPEG encoder. A value of 0 disables the limit.
enableDropOversizedVideoFrameboolfalseFor the SDK internal JPEG encoder, whether to drop a frame that remains oversized at the lowest quality.
String fields must remain valid at least until createEngine returns. The engine copies them internally as needed. The isBTScoMode field does not exist on Linux.

AoqConnectConfig

FieldTypeDefault valueDescription
tokenconst char\*nullptrConnection authentication token
sidconst char\*nullptrSession ID
certFingerprintconst char\*nullptrServer certificate fingerprint
workspaceIdHashconst char\*nullptrWorkspace ID hash
relayEndpointsconst AoqRelayEndpoint\*nullptrStart address of the relay access point array
relayEndpointsCountsize_t0Number of relay access points
publishTracksconst AoqTrackParam\*nullptrStart address of the array of publishing track attributes
publishTracksCountsize_t0Number of publishing tracks
subscribeTracksconst AoqTrackParam\*nullptrStart address of the array of subscribing track attributes
subscribeTracksCountsize_t0Number of subscribing tracks

AoqRelayEndpoint

FieldTypeDefault valueDescription
route_indexint-1Route index
endpointconst char\*nullptrDomain name or IP address of the relay server
portint0Port of the relay server
tcp_portint0TCP fallback port. A value of 0 uses the SDK default port, 443.
Note that the field name route_index uses snake case, unlike the camel case used by the other fields.

AoqTrackParam

FieldTypeDefault valueDescription
trackTypeAoqTrackTypeAoqTrackTypeAudioTrack type
trackModeAoqTrackModeAoqTrackModeSegmentStreaming or non-streaming mode. Effective only for the audio downlink.

AoqDataMsg

FieldTypeDefault valueDescription
dataconst uint8_t\*nullptrMessage content. It points to memory held by the caller.
dataSizesize_t0Number of bytes
When the data is used in a callback, it is guaranteed to be valid only during the callback. For asynchronous use, copy the data yourself.

Statistics types

AoqStats

A summary of engine statistics, which is periodically reported through onStats. It uses an "array pointer + count" structure, in which all pointers default to nullptr and all counts default to 0.
FieldTypeDescription
audioPublishStatsconst AoqAudioPublishStats\*Array of publishing statistics for audio
audioPublishStatsCountunsigned intNumber of publishing statistics entries for audio
videoPublishStatsconst AoqVideoPublishStats\*Array of publishing statistics for video
videoPublishStatsCountunsigned intNumber of publishing statistics entries for video
dataMsgPublishStatsconst AoqDataMsgPublishStats\*Array of publishing statistics for data messages
dataMsgPublishStatsCountunsigned intNumber of publishing statistics entries for data messages
audioSubscribeStatsconst AoqAudioSubscribeStats\*Array of subscribing statistics for audio
audioSubscribeStatsCountunsigned intNumber of subscribing statistics entries for audio
videoSubscribeStatsconst AoqVideoSubscribeStats\*Array of subscribing statistics for video
videoSubscribeStatsCountunsigned intNumber of subscribing statistics entries for video
dataMsgSubscribeStatsconst AoqDataMsgSubscribeStats\*Array of subscribing statistics for data messages
dataMsgSubscribeStatsCountunsigned intNumber of subscribing statistics entries for data messages
networkStatsconst AoqNetworkStats\*Network statistics

AoqAudioPublishStats

FieldTypeDefault valueDescription
trackTypeAoqTrackTypeAoqTrackTypeAudioTrack type
bitrateunsigned int0Bitrate, in bit/s
bytesuint64_t0Cumulative bytes sent
encodeVolumeunsigned int0Encoding volume of the publishing stream

AoqAudioSubscribeStats

FieldTypeDefault valueDescription
trackTypeAoqTrackTypeAoqTrackTypeAudioTrack type
bitrateunsigned int0Bitrate, in bit/s
bytesuint64_t0Cumulative bytes received
playVolumeunsigned int0Playback volume

AoqVideoPublishStats

FieldTypeDefault valueDescription
trackTypeAoqTrackTypeAoqTrackTypeVideoTrack type
bitrateunsigned int0Bitrate, in bit/s
bytesuint64_t0Cumulative bytes sent
encodeFpsunsigned int0Encoding frame rate

AoqVideoSubscribeStats

FieldTypeDefault valueDescription
trackTypeAoqTrackTypeAoqTrackTypeVideoTrack type
bitrateunsigned int0Bitrate, in bit/s
bytesuint64_t0Cumulative bytes received
decodeFpsunsigned int0Decoding frame rate
renderFpsunsigned int0Rendering frame rate

AoqDataMsgPublishStats / AoqDataMsgSubscribeStats

FieldTypeDefault valueDescription
trackTypeAoqTrackTypeAoqTrackTypeDataTrack type
bitrateunsigned int0Bitrate, in bit/s
bytesuint64_t0Cumulative bytes sent and received

AoqNetworkStats

FieldTypeDefault valueDescription
sendBitrateunsigned int0Send bitrate, in bit/s
sendBytesuint64_t0Cumulative bytes sent
recvBitrateunsigned int0Receive bitrate, in bit/s
recvBytesuint64_t0Cumulative bytes received
lossunsigned int0Packet loss rate, from 0 to 100
rttunsigned int0Round-trip latency, in ms

Enumerations

AoqTrackType

Enum valueValueDescription
AoqTrackTypeAudio0Audio track
AoqTrackTypeVideo1Video track
AoqTrackTypeData2Data message track
AoqTrackTypeScreen3Screen sharing track. Uplink only.

AoqTrackMode

Enum valueValueDescription
AoqTrackModeSegment0Segmented: data is packaged and delivered in semantic segments, such as a sentence.
AoqTrackModeStream1Streaming: data is delivered continuously.

AoqEncoderType

Enum valueValueDescription
AoqEncoderTypeUnknown0Unknown format
AoqEncoderTypeAudioPCM1Audio PCM
AoqEncoderTypeAudioOpus2Audio Opus (plug-in based; statically built into Linux and available out of the box)
AoqEncoderTypeVideoH2643Video H.264
AoqEncoderTypeVideoJpeg4Video JPEG
AoqEncoderTypeDataText5Message text

AoqConnectionStatus

Enum valueValueDescription
AoqConnectionStatusDisconnected0Disconnected
AoqConnectionStatusConnecting1Connecting
AoqConnectionStatusConnected2Connected
AoqConnectionStatusFailed3Connection failed

AoqErrorCode

Enum valueValueDescription
AoqECOK0Success
AoqECParamInvalid1Invalid parameter
AoqECStateInvalid2Invalid state
AoqECUnSupport3The API is called but is not implemented on the current platform or in the current mode
AoqECAudio100Generic audio error
AoqECAudioExternalBufferFull110External audio buffer is full
AoqECAudioDevice120Generic audio device error
AoqECAudioDeviceRecordingAuthFailed121Recording permission not granted
AoqECAudioDeviceRecordingOccupied122Recording device is in use
AoqECAudioDeviceRecordingBackgroundStart123Failed to start recording in the background
AoqECAudioDeviceRecordingStartFail124Failed to start recording
AoqECAudioDevicePlayoutOccupied125Playback device is in use
AoqECAudioDevicePlayoutBackgroundStart126Failed to start playback in the background
AoqECAudioDevicePlayoutStartFail127Failed to start playback
AoqECAudioDeviceEarpieceRequiresVoipMode128The receiver requires VoIP mode (mobile scenarios)
AoqECVideo200Generic video error
AoqECVideoExternalBufferFull210External video buffer is full
AoqECVideoExternalCaptureNotEnabled211External video capture is not enabled
AoqECVideoExternalEncoderNotEnabled212External video encoding is not enabled
AoqECVideoDevice220Generic video device error
AoqECVideoDeviceCameraOpenFail221Failed to open the camera
AoqECVideoDeviceCameraAuthFailed222Camera permission not granted
AoqECVideoDeviceCameraOccupied223Camera is in use
AoqECVideoDeviceCameraRunningError224Camera runtime exception
AoqECVideoCodec230Generic video codec error
AoqECVideoCodecEncoderInitFail231Failed to initialize the video encoder
AoqECVideoRender240Generic video rendering error
AoqECVideoRenderCreateFail241Failed to create video rendering
AoqECVideoRenderDrawError242Video rendering drawing error
AoqECScreen300General screen capture error
AoqECScreenAuthFailed310Screen capture permission denied
AoqECScreenStartFailed311Failed to start screen capture

AoqWarningCode

Enum valueValueDescription
AoqWCOK0No warning
AoqWCAudio100Generic audio warning
AoqWCAudioHowling101Audio howling detected
AoqWCAudioDevice120Generic audio device warning
AoqWCAudioDeviceMicEnumerateError121Microphone enumeration error
AoqWCAudioDeviceMicStartTimeout122Microphone startup timed out
AoqWCAudioDeviceRecordingError123Error during recording
AoqWCAudioDeviceSpeakerEnumerateError124Speaker enumeration error
AoqWCAudioDeviceSpeakerStartTimeout125Speaker startup timed out
AoqWCAudioDevicePlayoutError126Error during playback
AoqWCVideo200Generic video warning
AoqWCVideoCameraEnumerateError201Camera enumeration error
AoqWCVideoEncoderSwitched202Video encoder switched
AoqWCVideoRenderDowngrade203Video rendering downgraded

AoqMirrorMode

Enum valueValueDescription
AoqMirrorModeDisabled0Disable mirroring
AoqMirrorModeEnabled1Enable mirroring

AoqOrientationMode

Enum valueValueDescription
AoqOrientationModeAuto0Auto-fit
AoqOrientationModePortrait1Portrait
AoqOrientationModeLandscape2Landscape

AoqRenderMode

Enum valueValueDescription
AoqRenderModeAuto0Adaptive mode
AoqRenderModeStretch1Stretch mode
AoqRenderModeFill2Fill mode
AoqRenderModeCrop3Crop mode
This is used only as AoqVideoCanvas.renderMode. Linux has no rendering implementation, so this enumeration does not actually take effect.

AoqAudioStreamDirection

Enum valueValueDescription
AoqAudioStreamPublish0Publishing audio
AoqAudioStreamPlayout1Playback audio

AoqAudioExternalStreamToggle

Enum valueValueDescription
AoqAudioExternalStreamToggleNormal0Recovered
AoqAudioExternalStreamTogglePause1Paused
This enumeration is declared in the header, but no public API currently uses it. It is a reserved definition.

Audio types

AoqAudioCaptureConfig

FieldTypeDefault valueDescription
isExternalboolfalseSpecifies whether to use external capture
channelint1Number of audio capture channels. 1 and 2 are supported.

AoqAudioPlaybackConfig

FieldTypeDefault valueDescription
isExternalboolfalseSpecifies whether to use external playback
channelint1Number of audio playback channels. 1 and 2 are supported.

AoqAudioCodecConfig

FieldTypeDefault valueDescription
trackTypeAoqTrackTypeAoqTrackTypeAudioTrack type
codecTypeAoqEncoderTypeAoqEncoderTypeAudioOpusEncoding type
sampleRateint48000Sample rate, in Hz
channelint1Number of channels. 1 and 2 are supported.
bitrateint32000Bitrate, in bit/s
Sample rate constraints (excerpted from the comments in the header file):
  • Encoding: Opus supports 8 / 16 / 48K, and PCM supports 8 / 16 / 32 / 48K;
  • Decoding: 24K is additionally supported, but 24K is limited to Segment mode (Stream mode does not support 24K);
  • An invalid combination triggers the onError callback with AoqECParamInvalid during connect.

AoqAudioDeviceRouteType

Enum valueValueDescription
AoqAudioDeviceRouteDefault0Default route
AoqAudioDeviceRouteHeadset1Headphones
AoqAudioDeviceRouteEarpiece2Receiver
AoqAudioDeviceRouteHeadsetNoMic3Headphones without a microphone
AoqAudioDeviceRouteSpeakerPhone4Built-in speaker
AoqAudioDeviceRouteUsb5USB audio device
AoqAudioDeviceRouteBluetooth6Bluetooth
AoqAudioDeviceRouteBluetoothA2dp7Bluetooth A2DP
This is only a reference for the routeType values of onAudioDeviceRouteChanged. Linux does not trigger this callback.

AoqAudioDeviceStateCode

Enum valueValueDescription
AoqAudioDeviceNone0No state
AoqAudioDeviceRecordStarting1Capture starting
AoqAudioDeviceRecordStarted2Capture started
AoqAudioDeviceRecordStopping3Capture stopping
AoqAudioDeviceRecordStopped4Capture stopped
AoqAudioDeviceRecordFail5Capture failed
AoqAudioDevicePlayStarting6Playback starting
AoqAudioDevicePlayStarted7Playback started
AoqAudioDevicePlayStopping8Playback stopping
AoqAudioDevicePlayStopped9Playback stopped
AoqAudioDevicePlayFail10Playback failed

AoqAudioDeviceState

FieldTypeDefault valueDescription
stateAoqAudioDeviceStateCodeAoqAudioDeviceNoneDevice operation status
reasonint0Error reason code. See AoqErrorCode.

AoqAudioFrameData

Raw audio data. It is used for both external stream feeding through pushAudioExternalStreamData and the IAudioFrameObserver callback.
FieldTypeDefault valueDescription
dataPtrvoid\*0Pointer to the audio PCM data
numOfSamplesint0Number of samples (per channel)
bytesPerSampleint0Bytes per sample
numOfChannelsint0Number of channels
samplesPerSecint0Number of samples per second (sample rate)
pushSequenceint0PCM input round (used for the stream consumption completion notification)
timeStampint64_t0Timestamp
dataSizeint0Data length, in bytes
autoGenMuteboolfalseEffective only in callbacks. true indicates silent data generated by the SDK.

AoqAudioSource

Enum valueValueDescription
AoqAudioSourceCaptured0Captured audio data
AoqAudioSourceProcessCaptured1Audio data after 3A processing
AoqAudioSourcePublish2Audio data to be published (requires a successful connect)
AoqAudioSourcePlayback3Audio data to be played
AoqAudioSourceMax4Placeholder, do not use

AoqAudioObserverMode

Enum valueValueDescription
AoqAudioObserverModeReadOnly0Read-only mode
AoqAudioObserverModeReadWrite1Read-write mode

AoqAudioObserverConfig

FieldTypeDefault valueDescription
sampleRateint48000Sample rate of the callback audio, in Hz. Resampling is performed if the rate does not match that of the source.
channelsint1Number of audio channels in the callback. 1 and 2 are supported. This parameter is limited by the codec parameters of the subscribing stream.
modeAoqAudioObserverModeAoqAudioObserverModeReadOnlyCallback mode
Supported sample rates: 8, 12, 16, 24, 32, 44.1, 48, 64, 88.2, 96, 176.4, and 192K.

AoqAudioVolumeIndicationConfig

FieldTypeDefault valueDescription
reportSpeechboolfalseWhether to detect speech.
intervalint0Callback interval in milliseconds. A value of 0 or less disables callbacks. Values greater than 0 and less than 10 are treated as 10.
smoothint3Volume smoothing coefficient. Larger values provide more smoothing. Valid values: 0-10.

AoqAudioVolume

FieldTypeDefault valueDescription
isSpeechboolfalseWhether the audio contains speech.
volumeint0Smoothed instantaneous volume. Valid values: 0-255.

Audio file and external audio stream types

AoqAudioFileMixConfig

FieldTypeDefault valueDescription
fileNameconst char\*nullptrFile name (including the path)
cyclesint-1Number of loops. -1 indicates unlimited looping.
startPosMslong0Start playback position, in milliseconds
publishVolumeint100Publishing volume. Valid values: 0 to 100.
playoutVolumeint100Playback volume. Valid values: 0 to 100.
fileId is not part of the configuration body and is passed as a separate parameter to startAudioFile.

AoqAudioFileStateCode

Enum valueValueDescription
AoqAudioFileNone0No state
AoqAudioFileStarted1Started
AoqAudioFileStopped2Stopped
AoqAudioFilePaused3Paused
AoqAudioFileResumed4Resumed
AoqAudioFileEnded5Playback completed
AoqAudioFileBuffering6Buffering
AoqAudioFileBufferingEnd7Buffering ended
AoqAudioFileFailed8Playback failed

AoqAudioFileErrorCode

Enum valueValueDescription
AoqAudioFileNoError0No error
AoqAudioFileOpenFailed1Failed to open the file
AoqAudioFileDecodeFailed2Failed to decode the file

AoqAudioFileState

FieldTypeDefault valueDescription
fileIdconst char\*nullptrFile ID. It is valid only during the callback.
stateCodeAoqAudioFileStateCodeAoqAudioFileNoneFile status code
errorCodeAoqAudioFileErrorCodeAoqAudioFileNoErrorFile error code

AoqAudioExternalStreamConfig

FieldTypeDefault valueDescription
trackTypeAoqTrackTypeAoqTrackTypeAudioAudio track type
codecTypeAoqEncoderTypeAoqEncoderTypeAudioPCMAudio stream format. PCM is supported.
channelsint1Number of channels. It is limited by the audio codec of the publishing stream (1 and 2 are supported, and additional channels are ignored).
sampleRateint48000Sample rate, in Hz
playoutVolumeint100Playback volume. Valid values: 0 to 100.
publishVolumeint100Publishing volume. Valid values: 0 to 100.
maxBufferDurationint600000Maximum buffer duration, in milliseconds (that is, 10 minutes). Valid values: 100 and above. If the duration exceeds this value, Push fails.
enable3AboolfalseApply 3A processing to the input PCM (does not take effect on Linux)
Supported sample rates: 8, 12, 16, 24, 32, 44.1, 48, 64, 88.2, 96, 176.4, and 192K.
streamId is not part of the configuration body and is passed as a separate parameter to addAudioExternalStream.

Video types

AoqVideoCanvas

FieldTypeDefault valueDescription
viewvoid\*nullptrAn opaque pointer to the platform-native view handle. Pass nullptr to remove the binding.
renderModeAoqRenderModeAoqRenderModeAutoRendering fill mode
You must ensure that the lifecycle of view is longer than the period during which it is set by setLocalView / setRemoteView.
No corresponding platform implementation on Linux. This structure has no practical use on Linux.

AoqVideoCaptureConfig

FieldTypeDefault valueDescription
widthint1280Capture width, in pixels. This parameter is ineffective when isExternal=true.
heightint720Capture height, in pixels. This parameter is ineffective when isExternal=true.
fpsint15Capture frame rate. This parameter is ineffective when isExternal=true (the pace is determined by frame delivery).
isExternalboolfalseSpecifies whether to use external capture. If it is true, the camera is not opened, and frames are fed by pushExternalVideoCapturedFrame.
On Linux, we recommend that you always set isExternal = true.

AoqVideoCodecConfig

Encoding and decoding share the same structure. For decoding, only trackType / codecType / width / height / fps / bitrate take effect and participate in negotiation as a subscription proposal. minBitrate / keyframeInterval / mirrorMode / orientationMode / isExternal are used only for encoding.
FieldTypeDefault valueDescription
isExternalboolfalseExternal encoding mode. When it is true, you push encoded frames, and the SDK does not perform capture or encoding.
trackTypeAoqTrackTypeAoqTrackTypeVideoTrack type
codecTypeAoqEncoderTypeAoqEncoderTypeVideoH264Encoding type
widthint540Resolution width, in pixels
heightint960Resolution height, in pixels
fpsint5Frame rate
bitrateint500000Initial bitrate, in bit/s
minBitrateint128000Minimum bitrate, in bit/s
keyframeIntervalint2Keyframe interval, in seconds
mirrorModeAoqMirrorModeAoqMirrorModeDisabledMirror mode
orientationModeAoqOrientationModeAoqOrientationModeAutoOrientation mode

AoqVideoPixelFormat

Enum valueValueDescriptionSupported on Linux
AoqVideoPixelFormatUnknown0Unknown format-
AoqVideoPixelFormatI4201I420 (YUV planar format)Supported
AoqVideoPixelFormatNV122NV12 (YUV semi-planar format)Supported
AoqVideoPixelFormatNV213NV21 (YUV semi-planar format)Supported
AoqVideoPixelFormatBGRA4BGRA (32-bit)Supported
AoqVideoPixelFormatRGBA5RGBA (32-bit)Supported
AoqVideoPixelFormatCVPixelBuffer6Effective only on Apple platformsNot supported
AoqVideoPixelFormatTextureOES7Android external OES textureNot supported
AoqVideoPixelFormatTexture2D8Android regular 2D textureNot supported
Enum values 6/7/8 are still visible in the header file (they are not excluded by conditional compilation), but Linux does not have the corresponding platform capability. If you pass them, they are treated as unsupported formats.

AoqVideoFrame

An external raw video frame. It is used for both pushExternalVideoCapturedFrame and the IVideoFrameObserver callback.
FieldTypeDefault valueDescription
formatAoqVideoPixelFormatAoqVideoPixelFormatUnknownPixel format
widthint0Width, in pixels
heightint0Height, in pixels
dataPtrvoid\*0Packed-format data (NV12 / NV21 / BGRA / RGBA)
dataSizeint0Number of bytes of packed data
dataYvoid\*0I420 Y plane
dataUvoid\*0I420 U plane
dataVvoid\*0I420 V plane
strideYint0Stride of the Y plane
strideUint0Stride of the U plane
strideVint0Stride of the V plane
nativePixelBuffervoid\*0Used for Apple zero-copy (CVPixelBufferRef). This field is not used on Linux.
textureIdint0Android texture ID. This field is not used on Linux.
transformMatrixfloat array (16 elements)All zerosTexture transformation matrix (row-major 4x4). This field is not used on Linux.
timeStampint64_t0Timestamp, in milliseconds. If it is 0, the SDK fills it in with the local time.

AoqVideoCodecType

Enum valueValueDescription
AoqVideoCodecTypeJPEG0JPEG encoding

AoqVideoEncodedFrame

An externally encoded video frame. The caller performs the encoding, and the SDK packages and sends the frame directly without re-encoding.
FieldTypeDefault valueDescription
codecAoqVideoCodecTypeAoqVideoCodecTypeJPEGCodec format
datavoid\*nullptrPointer to the encoded data
dataSizeint0Number of bytes of the encoded data
widthint0Width, in pixels
heightint0Height, in pixels
timeStampint64_t0Timestamp, in milliseconds. If it is 0, the SDK fills it in with the local time.

AoqVideoDeviceStateCode

Enum valueValueDescription
AoqVideoDeviceNone0No state
AoqVideoDeviceCaptureStarting1Camera starting
AoqVideoDeviceCaptureStarted2Camera started
AoqVideoDeviceCaptureStopping3Camera stopping
AoqVideoDeviceCaptureStopped4Camera stopped
AoqVideoDeviceCaptureFail5Failed to start the camera (for example, permission denied or the device is unavailable)

AoqVideoDeviceState

FieldTypeDefault valueDescription
stateAoqVideoDeviceStateCodeAoqVideoDeviceNoneDevice capture operation status
reasonint0Error reason code. See AoqErrorCode.

AoqVideoSource

Enum valueValueDescription
AoqVideoSourceCaptured0Captured video data before preprocessing
AoqVideoSourcePreEncode1Video data before encoding, after preprocessing
AoqVideoSourceRemote2Remote video data after decoding and before rendering
AoqVideoSourceMax3Placeholder, do not use

AoqVideoObserverMode

Enum valueValueDescription
AoqVideoObserverModeReadOnly0Read-only mode
AoqVideoObserverModeReadWrite1Read-write mode (supported only for I420 / CVPixelBuffer)

AoqVideoObserverAlignment

Enum valueValueDescription
AoqVideoObserverAlignmentDefault0Default alignment
AoqVideoObserverAlignmentEven1Even-number alignment
AoqVideoObserverAlignment424-byte alignment
AoqVideoObserverAlignment838-byte alignment
AoqVideoObserverAlignment16416-byte alignment

AoqVideoObserverConfig

FieldTypeDefault valueDescription
formatAoqVideoPixelFormatAoqVideoPixelFormatI420Expected pixel format of the callback data
alignmentAoqVideoObserverAlignmentAoqVideoObserverAlignmentDefaultWidth alignment policy
modeAoqVideoObserverModeAoqVideoObserverModeReadOnlyCallback mode. ReadWrite is supported only for I420 / CVPixelBuffer.
mirrorAppliedboolfalseSpecifies whether to mirror the callback data
trackTypeAoqTrackTypeAoqTrackTypeVideoVideo track to observe. Supports Video and Screen only.

Screen capture types

AoqScreenCaptureConfig

FieldTypeDefaultDescription
isExternalboolfalseMust be true on Linux. The application captures the screen and supplies raw frames.
appGroupconst char*nullptrFor iOS only. Not used on this platform.
All types are defined in AoqClientEngine.h in the AoqClientSdk namespace. All structures are POD types with default values, so you get the default values in the table simply by declaring them. See each structure for field availability and platform scope. AoqScreenCaptureConfig.appGroup remains in the structure but is used only on iOS. sourceId and sourceType are excluded by conditional compilation and do not exist in the structure on Linux.

AoqScreenCaptureStateCode

Screen capture state enumeration. The type is defined, but the current SDK does not provide a corresponding state callback.
Enum valueValueDescription
AoqScreenCaptureNone0None
AoqScreenCaptureStarting1Starting
AoqScreenCaptureStarted2Started
AoqScreenCaptureStopping3Stopping
AoqScreenCaptureStopped4Stopped
AoqScreenCaptureFail5Failed

AoqScreenCaptureState

FieldTypeDescription
stateAoqScreenCaptureStateCodeScreen capture state code.
reasonintError code from AoqErrorCode. 0 indicates a normal state.