HI_MPI_RGN_AttachToChn 0xA0128003 错误

在创建COVER_RGN类型时

HI_MPI_RGN_AttachToChn   

0xA0128003 HI_ERR_RGN_ILLEGAL_PARAM 参数超出合法范围

在绑定到vi时,多半由于MPP_CHN_S 类型的设备ID错误,此处设备id为0,通道id填充你对应的vi通道


 coverHandle = 0;
    stCoverAttr.enType = COVER_RGN;
    s32Ret = HI_MPI_RGN_Create(coverHandle, &stCoverAttr);
    if(HI_SUCCESS != s32Ret)
    {
        printf("1111failed with %#x!\n", s32Ret);
        return HI_FALSE;
    }


    stCoverChn.enModId = HI_ID_VIU;
    stCoverChn.s32ChnId = 12;
    stCoverChn.s32DevId = 0;


    stCoverChnAttr.bShow = HI_TRUE;
    stCoverChnAttr.enType = COVER_RGN;
    stCoverChnAttr.unChnAttr.stCoverChn.stRect.s32X = 12;
    stCoverChnAttr.unChnAttr.stCoverChn.stRect.s32Y = 12;
    stCoverChnAttr.unChnAttr.stCoverChn.stRect.u32Width = 160;
    stCoverChnAttr.unChnAttr.stCoverChn.stRect.u32Height = 160;
    stCoverChnAttr.unChnAttr.stCoverChn.u32Color = 0xf888;
    stCoverChnAttr.unChnAttr.stCoverChn.u32Layer = 0;       
    s32Ret = HI_MPI_RGN_AttachToChn(coverHandle, &stCoverChn, &stCoverChnAttr);

你可能感兴趣的:(嵌入式开发)