Top  Previous  Next


Streams the specified image frame to the network.

 SendImage(const char* frame, unsigned int channelIndex = 0, unsigned int sizeY = 0);

[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.  

Return Values



This fragment of code generates sequential monochrome video frames with a random pattern and sends them over the network

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)   
for (ptr=buffer; ptr < buffer+width*heigh; ptr++)  


This function is typically called in a cycle to stream a series of image frames from the virtual camera to the network. The camera must be in the connected state and the acquisition must have been started by a client application.

If the SendImage cycle is called before the acquisition is started by the client, the LockFormat method must be called prior to calling SendImage in order to lock the execution of the thread until the AcquisitionStart command is issued by the client. Alternatively you can use the Write Callback to intercept AcquisitionStart and AcquisitionStop commands from the client application and to synchronize them with the beginning and end of the image transfer cycle.

Each image streamed with this function will contain a timestamp per GigE Vision standard indicating the exact time at which the image was generated. Depending on the Timer Mode, the timestamp will be reported either in the astronomical time or time elapsed from the start of the virtual camera application.

Note the channelIndex parameter should be used only if your virtual camera must support multiple streaming channels. For a regular GigE Vision transfer this parameter should remain in its default zero value.