hi_mpi_sys_ctl_epoll
Applicability
|
Product |
Supported |
|---|---|
|
Atlas 350 Accelerator Card |
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
☓ |
Function Description
Adds, deletes, or modifies the corresponding media data processing channel for the media data processing epoll instance.
The hi_mpi_sys_create_epoll, hi_mpi_sys_ctl_epoll, hi_mpi_sys_wait_epoll, and hi_mpi_sys_close_epoll APIs must be used together to operate the input/output data of the media data processing channel using the epoll programming model. The VPC function does not support this API.
Prototype
hi_s32 hi_mpi_sys_ctl_epoll(hi_s32 epoll_fd, hi_s32 operation, hi_s32 fd, hi_dvpp_epoll_event *event)
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
epoll_fd |
Input |
File descriptor of an epoll instance. Ensure that the file descriptor has been created by using hi_mpi_sys_create_epoll. |
|
operation |
Input |
Operation type (addition, deletion, or modification). For details, see hi_dvpp_epoll_ctl_op. |
|
fd |
Input |
File descriptor of the media data processing channel. In the VENC scenario, you can call the hi_mpi_venc_get_fd API to obtain the file descriptor in advance. To obtain a file descriptor in the VDEC scenario, call hi_mpi_vdec_get_fd. |
|
event |
Input |
Pointer to the epoll event information. This parameter describes the event type of the corresponding media data processing channel and the associated user data. This parameter is unused in the deletion operation and can be set to NULL. |
Returns
- 0: success
- Other values: failure. For details, see Common Return Codes.