I have a capture card from Black Magic Design company. In related document it is described that the GetBytes
method, from IDeckLinkVideoInputFrame
interface, allows direct access to the data buffer of a video frame. Here is my work:
HRESULT DeckLinkDevice::VideoInputFrameArrived (/* in */ IDeckLinkVideoInputFrame* videoFrame, /* in */ IDeckLinkAudioInputPacket* audioPacket)
{
char* str1;
voidPtrToFrame = NULL;
videoFrame->GetBytes(&voidPtrToFrame);
sprintf(str1, "%p", voidPtrToFrame);
// the below line does not work.
SetDlgItemText(m_uiDelegate->GetSafeHwnd(), IDC_handytxtBox, str1);
}
I also defined voidPtrToFrame
in class of DeckLinkDevice
:
class DeckLinkDevice::IDeckLinkInputCallback
{
...
void* voidPtrToFrame;
...
}
In the last line an error appears related to str1
:
argument of type "char*" is incompatible with parameter of type LPCWSTR
I want to know:
How can I display the value of voidPtrToFrame
in an Edit control? i.e. I want to present the address of buffer containing the video frame. In the following image I provided the necessary information about GetBytes
method.
I googled a lot and tested several ways. But I could not implement them in MFC.