[mpp]: add frame signal chain to mpp parser/hal thread and get_frame interface

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@254 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenHengming
2015-09-09 16:04:33 +00:00
parent 7cc518a721
commit 3f1100ca08
4 changed files with 18 additions and 1 deletions

View File

@@ -168,20 +168,27 @@ MPP_RET Mpp::get_frame(MppFrame *frame)
{
Mutex::Autolock autoLock(mFrames->mutex());
MppFrame first = NULL;
if (0 == mFrames->list_size()) {
mThreadCodec->signal();
mFrames->wait();
}
if (mFrames->list_size()) {
mFrames->del_at_tail(&first, sizeof(frame));
mFrameGetCount++;
mThreadHal->signal();
MppFrame prev = first;
MppFrame next = NULL;
while (mFrames->list_size()) {
mFrames->del_at_tail(&next, sizeof(frame));
mFrameGetCount++;
mThreadHal->signal();
mpp_frame_set_next(prev, next);
prev = next;
}
}
mThreadHal->signal();
*frame = first;
return MPP_OK;
}