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.

How can I use system_link API in hdvpss for DM8168

hi everyone !

 I have a problem to use SYSTEM_LINK;

1.I have create new system link.but it does not working.

the init code like this:

#define    SYSTEM_LINK_ID_SRC_DETECT       VPSS_LINK(54) 

Int32 SrcDetectLink_init()
{
Int32 status;
System_LinkObj linkObj;
SrcDetectLink_Obj *pObj;

/* register link with system API */

pObj = &gSrcDetectLink_obj;

memset(pObj, 0, sizeof(*pObj));

linkObj.pTsk = &pObj->tsk;
linkObj.linkGetFullFrames = NULL;//SrcDetectLink_getFullFrames;
linkObj.linkPutEmptyFrames = NULL;//SrcDetectLink_putEmptyFrames;
linkObj.getLinkInfo = NULL;//SrcDetectLink_getInfo;

status = System_registerLink(SYSTEM_LINK_ID_SRC_DETECT, &linkObj);
UTILS_assert(status == FVID2_SOK);

/** Create link task, task remains in IDLE state
CaptureLink_tskMain is called when a message command is received
*/

status = Utils_tskCreate(&pObj->tsk,
SrcDetectLink_tskMain,
SRC_DETECT_LINK_TSK_PRI,
gSrcDetectLink_tskStack,
SRC_DETECT_LINK_TSK_STACK_SIZE, pObj, "SRCDETECT");
UTILS_assert(status == FVID2_SOK);

Vps_printf("SrcDetectLink_init DONE!\n");

return status;
}
when I call System_linkControl(srcDetectId, SRCDETECT_LINK_CMD_DETECT_VIDEO, NULL, 0, TRUE) to send message . but it not working.

2.new system link not working .So I add new cmd to capture link.

code like this:

#define CAPTURE_LINK_CMD_IDENTIFY_INPUT			(0x100A)
		case CAPTURE_LINK_CMD_IDENTIFY_INPUT:
Vps_printf("Get CAPTURE_LINK_CMD_IDENTIFY_INPUT MESSAGE!\n");
Vps_printf("Do nothing now!\n");
Utils_tskAckOrFreeMsg(pRunMsg, status);
break;
add this in function CaptureLink_tskRun(); then use
	System_linkControl(gVcapModuleContext.captureId, CAPTURE_LINK_CMD_IDENTIFY_INPUT, NULL, 0, TRUE); in A8 side. But I find this also not working.

So I do not what is wrong?

can somebody help me to tell how to create new system link in HDVPSS package..

Thank You very much!