GetOptimalPacketSize
Top  Previous  Next

Description

Returns the optimal packet size for the video streaming in the current network configuration.


Syntax


[VB]
Value=objActiveGige.GetOptimalPacketSize


[C/C++]
HRESULT GetOptimalPacketSize( long* pValue );


Data Types
[VB]


Return value: long


Parameters
[C/C++]

pValue [out,retval]  
Pointer to the optimal packet value.  


Return Values


S_OK  
Success  
E_FAIL  
Failure  
E_NOINTERFACE  
Camera does not support packet size negotiation  


Example


This VB example finds the optimal packet size and modifies the packet size register of the camera accordingly. If the optimal packet size negotiaion failed, the packet size is set to 1500.

ActiveGigE1. Camera = 2
M
TU=ActiveGigE1.GetOptimalPacketSize
if
MTU=0
then

MTU=1500
endif

ActiveGige1.PacketSize=MTU

 

Remarks


The optimal packet size is determined using the packet negotiation functionality of GigE Vision cameras. Network packets of different sizes are requested from the camera until the maximum packet size possible for the current configuration is found. If the camera does not support the packet size negotiation, this method will return zero.

The value of the optimal packet size is typically defined by the maximum packet size supported by the network card and camera, whichever is lower. Setting the packet size to the optimal value reduces the CPU load during the video transmission.

negotiation