Where can I put sendFrameData()?

Description
I’m trying render custom data by using sendFrameData() function, but I can’t see anything on my screen.

Windows Video SDK version:

  • SDK Version 1.6.0 (11267)

Detail
When I call it in OnInitialize method:

UINT send_raw_data(LPVOID pParam)
{
	CustomVideoSource* pDemoDlg = (CustomVideoSource*)pParam;
	if (!pDemoDlg) return 0;
	IZoomVideoSDKVideoSender* sender = pDemoDlg->m_pSender;
        // mockup Y420 buffer -> Is right or not?
	vector<char> rawData(640 * 480 * 3 / 2, 0);

	while (1)
	{
		sender->sendVideoFrame(rawData.data(), 640, 480, 640 * 480 * 3 / 2, 0);
		Sleep(35);
	}

	return 0;
}
void CustomVideoSource::onInitialize(IZoomVideoSDKVideoSender* sender, IVideoSDKVector<VideoSourceCapability >* support_cap_list, VideoSourceCapability& suggest_cap) {
	// sender->sendVideoFrame()
	if (!sender) return;
	m_pSender = sender;
	//capability
	if (!support_cap_list) return;
	TCHAR szDbg[512] = { 0 };
	unsigned int nCount = support_cap_list->GetCount();

	for (int i = 0; i < nCount; i++)
	{
		VideoSourceCapability cap_ = support_cap_list->GetItem(i);
		wsprintf(szDbg, _T("onInitialize cap index:%d: frame=%d, Height=%d, width=%d \r\n"), i, cap_.frame, cap_.height, cap_.width);
		OutputDebugString(szDbg);
	}
// Can I call send_raw_data() here?
	send_raw_data(this);
}

Device:

  • Device: Lenovo Aero laptop
  • OS: Windows 10 22H2

How can I fix this problems? Many thanks