mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-16 14:11:10 +08:00
[mpp_enc]: Encoder async IO mode add 10ms timeout
Change-Id: I7477a32080c19bb05c1a9d9d7596925ed9ffbbaa Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
@@ -2489,6 +2489,7 @@ static MPP_RET try_get_async_task(MppEncImpl *enc, EncAsyncWait *wait)
|
|||||||
|
|
||||||
if (frm_in->list_size()) {
|
if (frm_in->list_size()) {
|
||||||
frm_in->del_at_head(&frame, sizeof(frame));
|
frm_in->del_at_head(&frame, sizeof(frame));
|
||||||
|
frm_in->signal();
|
||||||
mpp->mFrameGetCount++;
|
mpp->mFrameGetCount++;
|
||||||
|
|
||||||
mpp_assert(frame);
|
mpp_assert(frame);
|
||||||
|
@@ -679,7 +679,7 @@ MPP_RET Mpp::put_frame_async(MppFrame frame)
|
|||||||
return MPP_NOK;
|
return MPP_NOK;
|
||||||
|
|
||||||
/* NOTE: the max input queue length is 2 */
|
/* NOTE: the max input queue length is 2 */
|
||||||
if (mFrmIn->list_size() >= 2) {
|
if (mFrmIn->wait_le(10, 1)) {
|
||||||
mFrmIn->unlock();
|
mFrmIn->unlock();
|
||||||
return MPP_NOK;
|
return MPP_NOK;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user