GetPayloadSize
Top  Previous  Next

Description

Returns the current payload size of outgoing images.

[C++]
int
 GetPayloadSize(unsigned int channelIndex = 0);

Parameters
[C/C++]

[out] unsigned int channelIndex  
Index of the associated stream channel. Possible values are 0 or 1.  


Return Values


Currently selected payload size of outgoing images  
 

Example


This fragment of an MFC code uses the image size information to generate a periodic image pattern:

void GenerateImage(unsigned char* buffer)  
{  
   unsigned char *ptr = buffer;  
   for (unsigned int i = 0; i < m_pCamera->GetPayloadSize(); i++)   
   {  
         *ptr++=i;        
   }  
}  

Remarks

The payload size is typically equal to the size of each image in bytes, but can be larger when chunk data are appended to each image frame.

Width, Height, PixelFormat and PayloadSize are mandatory GigE Vision features which are automatically created when a virtual camera object is instantiated.

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.