Function: venc_send_frame
Applicability
|
Product |
Supported (√/x) |
|---|---|
|
|
x |
|
|
x |
|
|
x |
|
|
√ |
|
|
√ |
Function Usage
Feeds images to the encoder for encoding. This API is asynchronous.
Prototype
- C Prototype
1aclErroraclvencSendFrame(aclvencChannelDesc *channelDesc,acldvppPicDesc *input,void *reserve,aclvencFrameConfig *config,void *userdata)
- Python Function
1ret = acl.media.venc_send_frame(venc_channel_desc, input, reserve, config, userdata)
Parameter Description
|
Parameter |
Description |
|---|---|
|
venc_channel_desc |
Int, pointer address of a specified channel. Must be the same as channelDesc passed to the acl.media.venc_create_channel call. Specify the video encoding callback function in the channel description. |
|
input |
Int, pointer address of the input image description. You need to allocate the input buffer in advance.
|
|
reserve |
Int, reserved parameter. It is set to 0. |
|
config |
Int, pointer address of the configuration data of a single frame. |
|
userdata |
Python object, user-defined data. |
Return Value Description
|
Return Value |
Description |
|---|---|
|
ret |
Int, error code: 0 on success; else, failure. |
Restrictions
- This API is asynchronous. The API call delivers a task rather than executes a task. After this API is called, call the synchronization API (for example, acl.rt.synchronize_stream) to ensure that the task is complete.
- The channel passed to this call must have been created. Otherwise, an error code is returned.
- It is not supported to feed empty packets with eos set to 0 (the stream length is 0 or the stream address is empty).
- When an empty image with eos set to 1 is sent, the current encoding ends.