SDKCallback interface

Method nameDescription
onConnectedNetwork connection successful
onDisconnectedNetwork disconnected
onCloseRemote network connection closed
onScreenChangeReceive callback for changes in cloud device width and height
onClipboardMessageReceive callback for clipboard data returned from the cloud device instance
onFirstVideoFrameStart the cloud phone instance and receive the first frame callback of the video stream after subscribing
onLocalScreenshotVideo frame callback after calling screenshot(true)
onNetworkQualityNetwork latency callback
onIdeTimeoutNo-operation timeout callback for the current cloud phone instance

SDK callback interface

onConnected

Description:Network connection successful

Syntax:

void onConnected()

onDisconnected

Description:Network disconnected

Syntax:

void onDisconnected()

onClose

Description:Remote network closed

Syntax:

void onClose()

onScreenChange

Description:Receive callback for changes in cloud device width and height

Syntax:

void onScreenChange(int width, int height, int rotation)
ParameterDescription
widthdevice width
heightdevice height
rotationdevice rotation

onClipboardMessage

Description:Receive callback for clipboard data returned from the cloud device instance

Syntax:

void onClipboardMessage(const std::string& text)
ParameterDescription
textClipboard text of the cloud phone, encoded in UTF-8

onFirstVideoFrame

Description:Start the cloud phone instance and receive the first frame callback of the video stream after subscribing

Syntax:

void onFirstVideoFrame()

onLocalScreenshot

Description:Video frame callback after calling screenshot(true)

Syntax:

void onLocalScreenshot(std::shared_ptr<VideoFrame>& frame)
ParameterDescription
frameVideo frame, referenceVideoFrame

onNetworkQuality

Description:Current network latency callback

Syntax:

void onNetworkQuality(int rtt)
ParameterDescription
rttNetwork latency

onIdeTimeout

Description:No-operation timeout callback for the current cloud phone instance

Syntax:

void onIdeTimeout()

VideoRenderSink

MethodDescription
onFrameVideo frame, referenceVideoFrame
void onFrame(std::shared_ptr<armcloud::VideoFrame>& frame)

VideoFrame

MethodDescription
widthVideo frame width, in pixels (PX)
heightVideo frame height, in pixels (px)
rotationVideo frame rotation angle (0 degrees, 90 degrees, 180 degrees, 270 degrees)
bufferVideo frame data
sizeVideo frame data
uint32_t width()
uint32_t height()
uint32_t rotation()
uint8_t* buffer()
uint32_t size()