[mpp_task]: add advanced task flow to mpp, mpi_enc_test can work without error

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1035 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenHengming
2016-07-16 10:13:35 +00:00
parent 947da74b5d
commit ac9505c16c
10 changed files with 450 additions and 215 deletions

View File

@@ -43,6 +43,7 @@ static MppCodingTypeInfo support_list[] = {
{ MPP_CTX_DEC, MPP_VIDEO_CodingVP8, "dec", "vp8", },
{ MPP_CTX_DEC, MPP_VIDEO_CodingVP9, "dec", "VP9", },
{ MPP_CTX_DEC, MPP_VIDEO_CodingAVS, "dec", "avs+", },
{ MPP_CTX_ENC, MPP_VIDEO_CodingAVC, "enc", "h.264/AVC", },
};
#define check_mpp_ctx(ctx) _check_mpp_ctx(ctx, __FUNCTION__)
@@ -222,6 +223,8 @@ static MPP_RET mpi_dequeue(MppCtx ctx, MppPortType type, MppTask *task)
return MPP_ERR_UNKNOW;
}
ret = p->ctx->dequeue(type, task);
MPI_FUNCTION_LEAVE();
return ret;
}
@@ -235,11 +238,13 @@ static MPP_RET mpi_enqueue(MppCtx ctx, MppPortType type, MppTask task)
if (ret)
return ret;
if (type >= MPP_PORT_BUTT || task < 0) {
mpp_err_f("invalid input type %d task %d\n", type, task);
if (type >= MPP_PORT_BUTT || NULL == task) {
mpp_err_f("invalid input type %d task %p\n", type, task);
return MPP_ERR_UNKNOW;
}
ret = p->ctx->enqueue(type, task);
MPI_FUNCTION_LEAVE();
return ret;
}