mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-07 18:11:02 +08:00
[mpp]: add internal pts mode flag for mpeg2/mpeg4
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@953 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
@@ -39,6 +39,7 @@ struct MppDec_t {
|
||||
// work mode flag
|
||||
RK_U32 parser_need_split;
|
||||
RK_U32 parser_fast_mode;
|
||||
RK_U32 parser_internal_pts;
|
||||
|
||||
// dec parser thread runtime resource context
|
||||
MppPacket mpp_pkt_in;
|
||||
@@ -49,6 +50,7 @@ typedef struct {
|
||||
MppCodingType coding;
|
||||
RK_U32 fast_mode;
|
||||
RK_U32 need_split;
|
||||
RK_U32 internal_pts;
|
||||
void *mpp;
|
||||
} MppDecCfg;
|
||||
|
||||
|
@@ -37,6 +37,7 @@ typedef struct DecParserInitCfg_t {
|
||||
// output
|
||||
RK_S32 task_count;
|
||||
RK_U32 need_split;
|
||||
RK_U32 internal_pts;
|
||||
IOInterruptCB notify_cb;
|
||||
} ParserCfg;
|
||||
|
||||
|
@@ -789,6 +789,7 @@ MPP_RET mpp_dec_init(MppDec **dec, MppDecCfg *cfg)
|
||||
packet_slots,
|
||||
hal_task_count,
|
||||
cfg->need_split,
|
||||
cfg->internal_pts,
|
||||
cb,
|
||||
};
|
||||
|
||||
@@ -829,6 +830,7 @@ MPP_RET mpp_dec_init(MppDec **dec, MppDecCfg *cfg)
|
||||
p->mpp = cfg->mpp;
|
||||
p->parser_need_split = cfg->need_split;
|
||||
p->parser_fast_mode = cfg->fast_mode;
|
||||
p->parser_internal_pts = cfg->internal_pts;
|
||||
*dec = p;
|
||||
return MPP_OK;
|
||||
} while (0);
|
||||
|
@@ -353,6 +353,10 @@ RK_S32 VpuApi::control(VpuCodecContext *ctx, VPU_API_CMD cmd, void *param)
|
||||
mpicmd = MPP_DEC_SET_EXT_BUF_GROUP;
|
||||
break;
|
||||
}
|
||||
case VPU_API_USE_PRESENT_TIME_ORDER: {
|
||||
mpicmd = MPP_DEC_USE_PRESENT_TIME_ORDER;
|
||||
break;
|
||||
}
|
||||
case VPU_API_SET_DEFAULT_WIDTH_HEIGH: {
|
||||
VPU_GENERIC *p = (VPU_GENERIC *)param;
|
||||
RK_U32 ImgWidth = p->ImgWidth;
|
||||
|
17
mpp/mpp.cpp
17
mpp/mpp.cpp
@@ -57,7 +57,8 @@ Mpp::Mpp()
|
||||
mMultiFrame(0),
|
||||
mStatus(0),
|
||||
mParserFastMode(0),
|
||||
mParserNeedSplit(0)
|
||||
mParserNeedSplit(0),
|
||||
mParserInternalPts(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -80,6 +81,7 @@ MPP_RET Mpp::init(MppCtxType type, MppCodingType coding)
|
||||
coding,
|
||||
mParserFastMode,
|
||||
mParserNeedSplit,
|
||||
mParserInternalPts,
|
||||
this,
|
||||
};
|
||||
mpp_dec_init(&mDec, &cfg);
|
||||
@@ -298,14 +300,19 @@ MPP_RET Mpp::control(MpiCmd cmd, MppParam param)
|
||||
mpp_dec_control(mDec, cmd, param);
|
||||
break;
|
||||
}
|
||||
case MPP_DEC_USE_PRESENT_TIME_ORDER: {
|
||||
RK_U32 flag = *((RK_U32 *)param);
|
||||
mParserInternalPts = flag;
|
||||
break;
|
||||
}
|
||||
case MPP_DEC_SET_PARSER_SPLIT_MODE: {
|
||||
RK_U32 mode = *((RK_U32 *)param);
|
||||
mParserNeedSplit = mode;
|
||||
RK_U32 flag = *((RK_U32 *)param);
|
||||
mParserNeedSplit = flag;
|
||||
break;
|
||||
}
|
||||
case MPP_DEC_SET_PARSER_FAST_MODE: {
|
||||
RK_U32 mode = *((RK_U32 *)param);
|
||||
mParserFastMode = mode;
|
||||
RK_U32 flag = *((RK_U32 *)param);
|
||||
mParserFastMode = flag;
|
||||
break;
|
||||
}
|
||||
case MPP_DEC_GET_STREAM_COUNT: {
|
||||
|
Reference in New Issue
Block a user