Hi Ti's experts,
We referred to Demo timmlibenc(Path: /sdk/qnx/psdkqa/qnx/codec/img/qnx/encoder/test SDK 8.05 in QNX), and successfully added the coding function to our application.
At the same time, we disabled automatic start of processes vxd_dec and vxe_enc.
But our latest discovery is that there may be occasional “MM_ENC_Init failed” during program operation, like this,

At this time, the encoder cannot operate normally due to this fault. But if I run our application again, the encoder will initialize successfully

We also received debugging information for tisci-mgr(tisci-mgr -v) at the same time

It seems that the error exception was caused by the hardware not returning ACK, am i right?
This problem sometimes occurs during the first running our app, and sometimes after multiple restarts of.
Could you please help us to solve this problem, thanks?
The code for initializing the encoder is as follows
{
status = procmgr_ability(0,
PROCMGR_AOP_ALLOW | PROCMGR_ADN_NONROOT | PROCMGR_AID_KEYDATA,
PROCMGR_AOP_ALLOW | PROCMGR_ADN_NONROOT | PROCMGR_AID_IO,
PROCMGR_AOP_ALLOW | PROCMGR_ADN_NONROOT | PROCMGR_AID_MEM_PHYS,
PROCMGR_AOP_ALLOW | PROCMGR_ADN_NONROOT | PROCMGR_AID_PRIORITY,
PROCMGR_AOP_DENY | PROCMGR_ADN_NONROOT | PROCMGR_AOP_LOCK | PROCMGR_AID_EOL);
if (status != VX_SUCCESS)
{
CALMCAR_ERROR("Unable to gain procmgr abilities for nonroot operation.{}", status);
return status;
}
mm_status = ThreadCtl(_NTO_TCTL_IO, 0);
if (mm_status != VX_SUCCESS)
{
CALMCAR_ERROR("Unable to ThreadCtl.{}", mm_status);
return status;
}
mm_enc_init_params init_params = {0};
MM_ENC_SetDefaultInitParams(&init_params);
mm_status = MM_ENC_Init(&init_params);
if(MM_SUCCESS != mm_status)
{
CALMCAR_ERROR("Error: MM_ENC_Init failed {}", mm_status);
}
else
{
venc_ctrl.intra_pred_modes = encoder_params->intra_pred_modes;
mm_status = MM_ENC_Create(&venc_params, &venc_ctrl, &encoder_obj->channel_id);
}
if(MM_SUCCESS != mm_status)
{
CALMCAR_ERROR("MM_ENC Create failed {}", mm_status);
status = VX_FAILURE;
}
}
if (VX_SUCCESS == status)
{
mm_status = MM_ENC_RegisterCb(DvrErrorCb, encoder_obj->channel_id, (void *)encoder_obj);
if(MM_SUCCESS != mm_status)
{
CALMCAR_ERROR("MM_ENC Register Callback failed {}", mm_status);
status = VX_FAILURE;
}
}
if (VX_SUCCESS == status)
{
mm_status = MM_ENC_StartStreaming(encoder_obj->channel_id, MM_BUF_TYPE_VIDEO_OUTPUT);
mm_status |= MM_ENC_StartStreaming(encoder_obj->channel_id, MM_BUF_TYPE_VIDEO_INPUT);
if (MM_SUCCESS != mm_status)
{
CALMCAR_ERROR("MM_ENC Start Streaming failed");
status = VX_FAILURE;
}
}
Best Wishes