Hi,
Some errors occur in ipcInM3Link like this:
What causes it?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
Some errors occur in ipcInM3Link like this:
What causes it?
call the VcapVenc_start() function
/*******************************************************************************
* *
* Copyright (c) 2011 Texas Instruments Incorporated - http://www.ti.com/ *
* ALL RIGHTS RESERVED *
* *
******************************************************************************/
/**
\file my_vcap_venc.c
\brief
*/
#include "mcfw/src_linux/mcfw_api/usecases/multich_common.h"
#include <my_vcap_venc.h>
VcapVenc_Ctrl gVcapVenc_ctrl;
Void myVsysInit(Bool hdDemo)
{
VSYS_PARAMS_S vsysParams;
UInt32 useCase;
Vsys_params_init(&vsysParams);
if(hdDemo)
useCase = VSYS_USECASE_MULTICHN_HD_VCAP_VENC;
else
useCase = VSYS_USECASE_MULTICHN_VCAP_VENC;
vsysParams.systemUseCase = useCase;
vsysParams.enableCapture = TRUE;
vsysParams.enableNsf = TRUE;//FALSE;
vsysParams.enableEncode = TRUE;
vsysParams.enableDecode = FALSE;
vsysParams.enableNullSrc = FALSE;
vsysParams.numDeis = 2;
if(hdDemo)
{
vsysParams.numSwMs = 0;
vsysParams.numDisplays = 2;
vsysParams.enableSecondaryOut = FALSE;//TRUE;
vsysParams.enableMjpegEnc = FALSE;//TRUE;
vsysParams.enableSclr = FALSE;//TRUE;
vsysParams.enableOsd = FALSE;//TRUE;
vsysParams.enableScd = FALSE;//TRUE;
}
else
{
vsysParams.numSwMs = 1;
vsysParams.numDisplays = 1;
vsysParams.enableSecondaryOut = TRUE; /* NOT USED for this use case */
vsysParams.enableMjpegEnc = TRUE;
vsysParams.enableOsd = TRUE;
vsysParams.enableScd = TRUE;
}
if (vsysParams.enableSecondaryOut)
{
if(vsysParams.enableMjpegEnc == FALSE)
gDemo_info.maxVencChannels *= 2;
else
gDemo_info.maxVencChannels *= 3;
}
if(hdDemo)
{
gDemo_info.maxVcapChannels = 2;
gDemo_info.maxVdisChannels = 0;
gDemo_info.maxVencChannels = 2;//4;
gDemo_info.maxVdecChannels = 0;
}
else
{
gDemo_info.maxVcapChannels = 16;
gDemo_info.maxVdisChannels = 16;
gDemo_info.maxVencChannels = 16;
gDemo_info.maxVdecChannels = 0;
}
Vsys_init(&vsysParams);
}
Void MyVsysStart(Bool hdDemo)
{
MyVsysInit(hdDemo);
MyVsysLinkCreate();
}
Void MyVcapStart(Bool hdDemo)
{
MyVcapChnInit(hdDemo);
MyVcapLinkCreate();
Vcap_start();
}
Void MyVencStart(Bool hdDemo)
{
MyVencChnInit(hdDemo);
/* Init the application specific module which will handle bitstream exchange */
VcapVenc_bitsWriteCreate();
MyVencLinkCreate();
Venc_start();
}
Void VcapVenc_start(Bool hdDemo)
{
MyVsysStart(hdDemo);
MyVcapStart(hdDemo);
MyVencStart(hdDemo);
}
Void VcapVenc_stop()
{
VSYS_PARAMS_S contextInf;
Vsys_getContext(&contextInf);
/* Stop components */
Vcap_stop();
Venc_stop();
VcapVenc_bitsWriteDelete();
Vsys_delete();
/* De-initialize components */
Vcap_exit();
Venc_exit();
Vsys_exit();
}
The issue is because the ipcInM3 link is not created but you are starting the link. The file you shared is not a usecase file. I don't see Vsys_create being done . Pls check you usecase file and ensure links that you don't use have linkID set to INVALID ID.
Thanks, Badri. The ipcInM3 link issue has been settled, but another problem arised. I found it does not signal the gVcapVenc_ctrl.wrSem semophore, so it stop here:
status = OSA_semWait(&gVcapVenc_ctrl.wrSem, OSA_TIMEOUT_FOREVER);
And this issue due to no newDataAvailable for encode:
callback.newDataAvailableCb = VcapVenc_bitsWriteCbFxn;
Why the encoder fail to get new data?
Pls check your usecase file where the link connections are setup to ensure you are connecting them correctly and you are starting all links.Also check the logs of Vsys_printBufferStatistics to see in which links buffers are getting locked.
Hi, Badri. The usecase can work normally now. I've changed ipcOutVpssPrm.notifyNextLink from TRUE to FALSE and ipcOutVpssPrm.noNotifyMode from FALSE to TRUE. And it seems no need to start ipcM3In Link.
ipcOutVpssPrm.notifyNextLink = FALSE;//TRUE;//FALSE;
ipcOutVpssPrm.notifyPrevLink = TRUE;
ipcOutVpssPrm.noNotifyMode = TRUE;//FALSE;