+ //init + obj->channel_params.active_channel_id = 2; + obj->switch_preproc_ch_obj = vxCreateUserDataObject(obj->context, "tivx_preproc_select_channel_params_t", sizeof(tivx_preproc_select_channel_params_t),&obj->channel_params); + status = vxGetStatus((vx_reference)obj->switch_preproc_ch_obj); +static vx_status SendCmdtoPreProc(AppObj *obj,PreProcObj *preProcObj) +{ + + if(obj->switch_preproc_ch_obj == NULL) + { + vx_status status = VX_FAILURE; + return status; + } + + + vx_reference refs[1]; + vx_status status = VX_FAILURE; + + obj->channel_params.active_channel_id = (obj->channel_params.active_channel_id + 1) % NUM_CAPT_CHANNELS_TOTAL; + APP_PRINTF("active_channel_id:%d\n",obj->channel_params.active_channel_id); + vxCopyUserDataObject(obj->switch_preproc_ch_obj, 0, + sizeof(tivx_preproc_select_channel_params_t), + &obj->channel_params, VX_WRITE_ONLY, VX_MEMORY_TYPE_HOST); + refs[0] = (vx_reference) obj->switch_preproc_ch_obj; + status = tivxNodeSendCommand(preProcObj->node, 0u, TIVX_PREPROC_SELECT_CHANNEL, refs, 1u); + APP_PRINTF("App Send Preproc Command Done!\n"); + + if(status != VX_SUCCESS) + { + APP_PRINTF("PreProc: Node send command failed!\n"); + } + + return status; +} + + if(status == VX_SUCCESS ) + { + status = SendCmdtoPreProc(obj,&obj->preProcObj); + }