Pushing Video Streams Using a Third Party
API Description
In the custom video stream collection scenario, after data streams are collected, you can call this API to push streams using a third party.
Precautions
Call this API during a meeting or call.
Method Definition
1 2 3 4 5 6 |
/** * Pushes streams collected by a third party. * @param videoFrameParam Indicates the videoFrameParam object. * @param callback Indicates the result callback. */ void pushExternalVideoFrame(VideoFrameParam videoFrameParam, HwmCallback<Void> callback); |
Parameter Description
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
videoFrameParam |
No |
VideoFrameParam |
videoFrameParam object. |
callback |
No |
HwmCallback |
Result callback. |
Return Values
None
Parameter Extension
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
frameDate |
Yes |
byte[] |
Video data. |
frameWidth |
Yes |
int |
Image width. When it is used as an input parameter, the value must be an integral multiple of 4, ranging from 90 to 1920. |
frameHeight |
Yes |
int |
Image height. When it is used as an input parameter, the value must be an integral multiple of 2, ranging from 90 to 1200. |
videoFrameFormat |
Yes |
VideoFrameFormat |
Image format. The format used by the current demo is VIDEO_FRAME_FORMAT_NV21. After conversion, the image format must be set to 105. VIDEO_FRAME_FORMAT_I420(100, "I420") VIDEO_FRAME_FORMAT_YV12(101, "YV12") VIDEO_FRAME_FORMAT_NV21(105, "NV21") VIDEO_FRAME_FORMAT_UNKNOWN(999, "UNKNOWN") |
displayRotation |
Yes |
DisplayRotation |
Video display angle. ROTATION_0(0, "0 degree clockwise rotation") ROTATION_90(1,"90 degree clockwise rotation") ROTATION_180(2, "180 degree clockwise rotation") ROTATION_270(3, "270 degree clockwise rotation") |
ExternalVideoFrameParam videoFrameParam = new ExternalVideoFrameParam(); videoFrameParam.setFrameDate(mData); videoFrameParam.setFrameWidth(1920); videoFrameParam.setFrameHeight(1080); videoFrameParam.setDisplayRotation(DisplayRotation.ROTATION_0); videoFrameParam.setVideoFrameFormat(VideoFrameFormat.VIDEO_FRAME_FORMAT_NV21); HWMBizSdk.getBizOpenApi().pushExternalVideoFrame(videoFrameParam, new HwmCallback<Void>() { @Override public void onSuccess(Void aVoid) { } @Override public void onFailed(int retCode, String desc) { Log.i(TAG, "code: " + retCode); } });
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot