我用的是DVRRDK 4.03的版本,我参考osdlink的架构自己写了个link,但是当我使用SWOSD_open这个函数的时候就报错,所以我就跟到这个函数里面去,这个函数是这样的:
Int32 SWOSD_open(SWOSD_Obj * pObj, SWOSD_OpenPrm *openPrm)
{
Int32 status = SWOSD_SOK;
Int32 scratchId = g_scratchIndex;
SWOSD_Params prm;
IALG_Fxns * algFxns = (IALG_Fxns *)&SWOSD_TI_IALG;
IRES_Fxns * resFxns = &SWOSD_TI_IRES;
if(openPrm==NULL || pObj==NULL)
return SWOSD_EFAIL;
if( openPrm->maxWidth==0
|| openPrm->maxHeight==0
|| openPrm->maxWidth > SWOSD_MAX_WIDTH
|| openPrm->maxHeight > 1080
) {
return NULL;
}
memset(pObj, 0, sizeof(SWOSD_Obj));
memcpy(&pObj->openPrm, openPrm, sizeof(SWOSD_OpenPrm));
memset(&prm, 0, sizeof(prm));
prm.size = sizeof(prm);
prm.maxHeight = pObj->openPrm.maxHeight;
prm.maxWidth = pObj->openPrm.maxWidth;
prm.osdFormat = pObj->openPrm.osdFormat;
pObj->algHndl = DSKT2_createAlg((Int)scratchId,
(IALG_Fxns *)algFxns, NULL,(IALG_Params *)&prm);
if(pObj->algHndl==NULL)
{
status = SWOSD_EFAIL;
return status;
}
/* Assign resources to the algorithm */
status = RMAN_assignResources((IALG_Handle)pObj->algHndl, resFxns, scratchId);
if (status != IRES_OK) {
status = SWOSD_EFAIL;
return status;
}
return status;
}
然后我加了打印信息,发现是调用RMAN_assignResources这个函数的时候报错,而且返回值为7
这是怎么回事呢,还有哪里需要配置或者改的呢????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
Chris Meng:
你好,
请再对比一下你的代码和原始的SWOSD代码,看看是否你遗漏什么。