SetDestinationIP
Top  Previous  Next

Description

Sets the destination IP address and port for the specified stream channel.

Syntax


[VB]
objActiveGige.SetDestinationIP Channel, IP, Port


[C/C++]
HRESULT SetDestinationIP(long Channel, bstr IP, long Port );


Data Types
[VB]

Channel: Integer
IP: String
Port: Integer


Parameters
[C/C++]

Channel [in]  
Index of the streaming channel for which the destination address will be set  
 
IP [in]  
String specifying the destination IP address in the in the IPv4 format (four decimals in the range of 0-255 separated by dots). If empty, the video will be streamed to the IP address of the host application.  

Port [in]  
Destination port number. If 0, the value of 49152 will be used.  


Return Values

S_OK  
Success  
E_FAIL  
Failure.  

Example

This VB example sets different multicast end points for cameras #0 and #1:

ActiveGige1.SetCamera(0)
ActiveGige1.Set
DestinationIP
 
0
, "
239
.
0
.
1.1", 0   
ActiveGige1.Multicast=True 
ActiveGigE1.Acquire=
True
ActiveGige2.SetCamera(1)
ActiveGige2.SetDestinationIP 0, "239.0.1.2", 0   
ActiveGige2.Multicast=True 
ActiveGigE2.Acquire=
True

This VB example sets the destination address for stream channel #1, links it with video source #1 and activates streaming:

ActiveGige1.SetDestinationIP 1, "192.168.12.12", 41000  
ActiveGige1.SetFeatureInt "SourceSelector", 1         
ActiveGige1.SetFeature "GevStreamChannelSelector", 1  
ActiveGige1.SetFeature "AcquisitionStart", True
 

Remarks


Use this method to set the IP address and port for the multicast streaming if you need it to be different from the default address assigned by the IP configuration utility. The valid range of multicast addresses is 239.0.0.0 - 239.255.255.255. See Multicast for more details.

If your camera supports multiple stream channels, calling SetDestinationIP is mandatory prior to starting the video acquisition on a channel other than channel #0. If the IP parameter is an empty string, the video on the specified channel will be streamed to the IP address of your main application (the one that called this method) allowing you to receive video streams from several channels at the same destination. Using a specific IP as a parameter will allow you to stream video on a specified channel to a network destination different from the one of your ActiveGigE-based main application. It is typically used for re-routing the second-channel video to a different computer or/and client application. Note that you should call SetStreamChannel with a specific stream channel index in order for ActiveGigE to receive video data at a corresponding destination point.