mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-06 01:26:49 +08:00
[mpi]: Add poll interface to mpi
1. Add poll with timeout. Support three mode: block/non-block/timeout. 2. Change control MPP_SET_INPUT_BLOCK and MPP_SET_OUTPUT_BLOCK. 3. Remove msleep in most mpp interface. Change-Id: I39d9a261b6f1da66c6cb944abd71d1e7f4928d2d Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
13
inc/rk_mpi.h
13
inc/rk_mpi.h
@@ -229,12 +229,19 @@ typedef struct MppApi_t {
|
||||
MPP_RET (*isp_get_frame)(MppCtx ctx, MppFrame *frame);
|
||||
|
||||
// advance data flow interface
|
||||
/**
|
||||
* @brief poll port for dequeue
|
||||
* @param ctx The context of mpp
|
||||
* @param type input port or output port which are both for data transaction
|
||||
* @return 0 for success there is valid task for dequeue, others for failure
|
||||
*/
|
||||
MPP_RET (*poll)(MppCtx ctx, MppPortType type, MppPollType timeout);
|
||||
/**
|
||||
* @brief dequeue MppTask
|
||||
* @param ctx The context of mpp
|
||||
* @param type input port or output port which are both for data transaction
|
||||
* @param task MppTask which is sent to mpp for process
|
||||
* @return 0 for success, oters for failure
|
||||
* @return 0 for success, others for failure
|
||||
*/
|
||||
MPP_RET (*dequeue)(MppCtx ctx, MppPortType type, MppTask *task);
|
||||
/**
|
||||
@@ -242,7 +249,7 @@ typedef struct MppApi_t {
|
||||
* @param ctx The context of mpp
|
||||
* @param type input port or output port which are both for data transaction
|
||||
* @param task MppTask which is sent to mpp for process
|
||||
* @return 0 for success, oters for failure
|
||||
* @return 0 for success, others for failure
|
||||
*/
|
||||
MPP_RET (*enqueue)(MppCtx ctx, MppPortType type, MppTask task);
|
||||
|
||||
@@ -258,7 +265,7 @@ typedef struct MppApi_t {
|
||||
* @param ctx The context of mpp
|
||||
* @param cmd The mpi command
|
||||
* @param param The mpi command parameter
|
||||
* @return 0 for success, oters for failure
|
||||
* @return 0 for success, others for failure
|
||||
*/
|
||||
MPP_RET (*control)(MppCtx ctx, MpiCmd cmd, MppParam param);
|
||||
|
||||
|
Reference in New Issue
Block a user