pub struct StreamOptions { /* private fields */ }Expand description
How Camera::open_stream sets up a GigE
stream. The defaults: the interface the operating system routes to the
camera, unicast to a port the operating system picks, the camera’s own
packet size (path-probed, ADR-0021) and packet delay, packet resend when
the camera supports it, and a receive buffer the engine sizes from the
frame.
Implementations§
Source§impl StreamOptions
impl StreamOptions
Sourcepub fn monitor() -> Self
pub fn monitor() -> Self
Watch a multicast stream another application configured: claim nothing, write nothing, read the group, port and packet size from the camera’s stream channel registers, join the group and receive. Never asks for lost packets.
The camera must already stream to a multicast group; one streaming
unicast to another host cannot be watched. Works on a camera opened
with Access::Monitor and on one this
application controls.
Sourcepub fn iface(self, iface: Iface) -> Self
pub fn iface(self, iface: Iface) -> Self
Receive on this interface instead of the one routed to the camera.
Sourcepub fn packet_size(self, size: u32) -> Self
pub fn packet_size(self, size: u32) -> Self
Write this GevSCPSPacketSize, a ceiling for the path probe
(StreamBuilder::packet_size).
Sourcepub fn auto_packet_size(self) -> Self
pub fn auto_packet_size(self) -> Self
Set the packet size from the interface MTU, then probe
(StreamBuilder::auto_packet_size).
Sourcepub fn multicast(self, group: Ipv4Addr) -> Self
pub fn multicast(self, group: Ipv4Addr) -> Self
Have the camera stream to a multicast group, and join it.
Sourcepub fn destination_port(self, port: u16) -> Self
pub fn destination_port(self, port: u16) -> Self
Receive on this UDP port, for a firewall that admits only it
(StreamBuilder::destination_port). By default the operating system
picks a free one.
Sourcepub fn packet_delay(self, delay: Duration) -> Self
pub fn packet_delay(self, delay: Duration) -> Self
Have the camera wait delay between packets
(StreamBuilder::packet_delay). By default GevSCPD is left alone.
Sourcepub fn resend(self, policy: ResendPolicy) -> Self
pub fn resend(self, policy: ResendPolicy) -> Self
Whether to ask the camera for lost packets (default
ResendPolicy::Auto).
Sourcepub fn rcvbuf_bytes(self, bytes: usize) -> Self
pub fn rcvbuf_bytes(self, bytes: usize) -> Self
Ask for this SO_RCVBUF instead of letting the engine size it from
the frame (max(4 MiB, 2 × PayloadSize)).
Sourcepub fn payload_size(self, bytes: usize) -> Self
pub fn payload_size(self, bytes: usize) -> Self
The camera’s PayloadSize: the exact size of every frame buffer
(FrameStream::set_payload_size), in place before the first frame.
Camera::open_stream reads it from the
camera itself; GigeRegisterIo::open_stream,
which has no node map to read it with, sizes each frame from its
leader without it.