SDKCallback interface
Method name | Description |
---|---|
onConnected | Network connection successful |
onDisconnected | Network disconnected |
onClose | Remote network connection closed |
onScreenChange | Receive callback for changes in cloud device width and height |
onClipboardMessage | Receive callback for clipboard data returned from the cloud device instance |
onFirstVideoFrame | Start the cloud phone instance and receive the first frame callback of the video stream after subscribing |
onLocalScreenshot | Video frame callback after calling screenshot(true) |
onNetworkQuality | Network latency callback |
onIdeTimeout | No-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)
Parameter | Description |
---|---|
width | device width |
height | device height |
rotation | device rotation |
onClipboardMessage
Description:Receive callback for clipboard data returned from the cloud device instance
Syntax:
void onClipboardMessage(const std::string& text)
Parameter | Description |
---|---|
text | Clipboard 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)
Parameter | Description |
---|---|
frame | Video frame, referenceVideoFrame |
onNetworkQuality
Description:Current network latency callback
Syntax:
void onNetworkQuality(int rtt)
Parameter | Description |
---|---|
rtt | Network latency |
onIdeTimeout
Description:No-operation timeout callback for the current cloud phone instance
Syntax:
void onIdeTimeout()
VideoRenderSink
Method | Description |
---|---|
onFrame | Video frame, referenceVideoFrame |
void onFrame(std::shared_ptr<armcloud::VideoFrame>& frame)
VideoFrame
Method | Description |
---|---|
width | Video frame width, in pixels (PX) |
height | Video frame height, in pixels (px) |
rotation | Video frame rotation angle (0 degrees, 90 degrees, 180 degrees, 270 degrees) |
buffer | Video frame data |
size | Video frame data |
uint32_t width()
uint32_t height()
uint32_t rotation()
uint8_t* buffer()
uint32_t size()