SendImage
|
![]() ![]() ![]() |
|
[in] const char* frame
|
Pointer to the beginning of the image data (top left pixel). The image data format must be compatible with the one set via SetImageSize and SetPixelFormat.
|
|
[in] unsigned int channelIndex
|
Index of the associated stream channel. Possible values are 0 or 1.
|
|
[in] unsigned int sizeY
|
The vertical size of the frame to send. Can be used for simulating a line scan camera with a variable frame size. If zero or omitted, the full-size frame will be sent.
|
S_OK
|
Success
|
E_FAIL
|
Failure
|
|
if (m_pCamera->connect(m_interfaceList.GetCurSel());
|
m_exitThread = false;
|
m_thread = CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)videoGenThread, this, 0, NULL);
|
|
void CGigemuDlg::videoGenerator()
|
{
|
int width;
|
int height;
|
char buffer[MAXWIDTH*MAXHEIGHT];
|
char *ptr;
|
int i=0;
|
while (!m_exitThread)
|
{
|
m_pCamera->LockFormat();
|
width=m_pCamera->GetWidth();
|
height=m_pCamera->GetHeight();
|
for (ptr=buffer; ptr < buffer+width*heigh; ptr++)
|
*ptr=i++;
|
m_pCamera->SendImage(buffer);
|
Sleep(20);
|
}
|
}
|