Skip to main content

Module network

Module network 

Source
Expand description

Network configuration types for network-backed sources and outputs.

This module provides NetworkOptions — shared connection and reconnect settings consumed by network-aware decoders (e.g., RTMP, SRT, HLS ingest) and live streaming outputs.

§FFmpeg key mapping

FieldFFmpeg option keyUnit
connect_timeouttimeoutmicroseconds
read_timeoutrw_timeoutmicroseconds

§Examples

use ff_format::network::NetworkOptions;
use std::time::Duration;

let opts = NetworkOptions {
    connect_timeout: Duration::from_secs(5),
    read_timeout: Duration::from_secs(15),
    reconnect_on_error: true,
    max_reconnect_attempts: 5,
};
assert_eq!(opts.connect_timeout.as_micros(), 5_000_000);

Structs§

NetworkOptions
Shared network configuration for network-backed decoders and live outputs.