[mpp]: add packet/frame block flag and multi-frame output flag

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@363 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenHengming
2015-10-12 22:29:38 +00:00
parent 99cb6a06a6
commit 9f2ce51ade
2 changed files with 19 additions and 9 deletions

View File

@@ -51,6 +51,9 @@ Mpp::Mpp(MppCtxType type, MppCodingType coding)
mThreadHal(NULL), mThreadHal(NULL),
mType(type), mType(type),
mCoding(coding), mCoding(coding),
mPacketBlock(0),
mFrameBlock(0),
mMultiFrame(0),
mStatus(0), mStatus(0),
mDec(NULL), mDec(NULL),
mEnc(NULL) mEnc(NULL)
@@ -177,6 +180,7 @@ MPP_RET Mpp::get_frame(MppFrame *frame)
if (0 == mFrames->list_size()) { if (0 == mFrames->list_size()) {
mThreadCodec->signal(); mThreadCodec->signal();
if (mFrameBlock)
mFrames->wait(); mFrames->wait();
} }
@@ -185,6 +189,7 @@ MPP_RET Mpp::get_frame(MppFrame *frame)
mFrameGetCount++; mFrameGetCount++;
mThreadHal->signal(); mThreadHal->signal();
if (mMultiFrame) {
MppFrame prev = first; MppFrame prev = first;
MppFrame next = NULL; MppFrame next = NULL;
while (mFrames->list_size()) { while (mFrames->list_size()) {
@@ -195,6 +200,7 @@ MPP_RET Mpp::get_frame(MppFrame *frame)
prev = next; prev = next;
} }
} }
}
*frame = first; *frame = first;
return MPP_OK; return MPP_OK;
} }

View File

@@ -98,6 +98,10 @@ public:
MppCtxType mType; MppCtxType mType;
MppCodingType mCoding; MppCodingType mCoding;
RK_U32 mPacketBlock;
RK_U32 mFrameBlock;
RK_U32 mMultiFrame;
RK_U32 mStatus; RK_U32 mStatus;
MppDec *mDec; MppDec *mDec;