Expand description
Network streaming for OxiMedia.
This crate provides network streaming protocols for the OxiMedia multimedia
framework. It supports various streaming protocols including:
- HLS (HTTP Live Streaming) - Apple’s adaptive streaming protocol
- DASH (Dynamic Adaptive Streaming over HTTP) - MPEG-DASH streaming
- RTMP (Real-Time Messaging Protocol) - Flash streaming protocol
- SRT (Secure Reliable Transport) - Low-latency streaming
- WebRTC - Real-time browser communication
- SMPTE ST 2110 - Professional media over IP (uncompressed video/audio/ANC)
- CDN - Multi-CDN failover and load balancing
§Overview
Each streaming protocol module provides:
- Protocol-specific packet/message types
- Parsing and serialization
- Session management
- Adaptive bitrate support where applicable
The CDN module provides:
- Multi-CDN provider support (Cloudflare, Fastly, Akamai, CloudFront, Custom)
- Real-time health monitoring
- Automatic failover with circuit breaker pattern
- Intelligent routing strategies
- Performance metrics and SLA monitoring
The SMPTE ST 2110 module provides:
- Uncompressed video transport (ST 2110-20)
- PCM audio transport (ST 2110-30)
- Ancillary data transport (ST 2110-40)
- PTP synchronization (IEEE 1588)
- SDP session description
- Broadcast-quality professional media over IP
§Example
ⓘ
use oximedia_net::hls::{MasterPlaylist, MediaPlaylist};
use oximedia_net::error::NetResult;
async fn fetch_playlist(url: &str) -> NetResult<MasterPlaylist> {
// Fetch and parse HLS master playlist
todo!()
}Re-exports§
pub use error::NetError;pub use error::NetResult;pub use srt::DirectionStats;pub use srt::RttStats;pub use srt::SrtStreamStats;pub use srt::StreamQuality;pub use srt::EncryptionSession;pub use srt::EncryptionState;pub use srt::KmxKeyMaterial;pub use srt::KwAlgorithm;pub use abr::streaming::AbrBandwidthEstimator as BandwidthEstimator;pub use abr::streaming::AbrController;pub use abr::streaming::AbrSwitchReason;pub use abr::streaming::AbrVariant;pub use abr::streaming::BandwidthSample;pub use abr::streaming::BufferedSegment;pub use abr::streaming::SegmentFetcher;pub use abr::streaming::SelectionResult;
Modules§
- abr
- Unified Adaptive Bitrate (ABR) streaming controller.
- abr_
buffer - Buffer-based ABR (BBA) strategy — selects quality based on buffer occupancy.
- bandwidth_
adaptation - Bandwidth-aware transcoding adaptation controller.
- bandwidth_
estimator - Network bandwidth estimation for RTP/live streams.
- bandwidth_
probe - Active bandwidth probing scheduler with EWMA estimation and packet-loss integration.
- bandwidth_
throttle - Bandwidth throttling and rate-limiting for network transfers.
- bandwidth_
trigger - Bandwidth-aware transcoding quality trigger.
- buffer_
model - Client buffer model for adaptive streaming.
- cdn
- Multi-CDN failover and load balancing for OxiMedia streaming.
- connection_
pool - Connection pooling for persistent network connections.
- dash
- DASH (Dynamic Adaptive Streaming over HTTP) protocol implementation.
- error
- Error types for network streaming operations.
- fec
- Forward Error Correction (FEC) for RTP streams.
- fec_
interleave - Interleaved Forward Error Correction with chunk-aligned XOR.
- flow_
control - TCP-inspired flow and congestion control primitives.
- hls
- HLS (HTTP Live Streaming) protocol implementation.
- http2
- HTTP/2 basic frame encoding and decoding (RFC 7540).
- ice
- ICE (Interactive Connectivity Establishment) for WebRTC NAT traversal.
- live
- Live HLS/DASH streaming server.
- ll_dash
- Low-Latency DASH (LL-DASH) with CMAF chunked transfer encoding.
- ll_
dash_ config - LL-DASH chunked transfer encoding configuration and assembly.
- manifest_
cache - Manifest and playlist caching layer.
- mdns
- mDNS / DNS-SD service discovery (RFC 6762 / RFC 6763).
- multicast
- IP multicast management.
- multicast_
manager - Advanced IP multicast group manager with IGMP/MLD simulation.
- multipath
- Multipath streaming — redundant transmission over multiple network interfaces.
- network_
path - Network path discovery and latency estimation.
- network_
simulator - Deterministic network condition simulator for testing adaptive bitrate algorithms.
- pacing
- Packet pacing for SRT and other UDP-based protocols.
- packet_
buffer - Network packet buffer with priority queuing and expiry.
- playlist_
parser - Unified HLS/DASH playlist parser with auto-detection and URL resolution.
- protocol_
detect - Network protocol auto-detection from URIs and byte patterns.
- qos_
monitor - Quality-of-Service monitoring for network media streams.
- quic
- QUIC transport abstraction layer.
- quic_
datagram - QUIC datagram mode for ultra-low-latency media transport.
- relay
- Media relay and restreaming server.
- retry_
policy - Retry policies for network operations.
- rist
- RIST (Reliable Internet Stream Transport) protocol implementation.
- rtmp
- RTMP (Real-Time Messaging Protocol) implementation.
- rtp_
session - RTP session tracking and statistics.
- rtsp
- RTSP 1.0 client implementation (RFC 2326).
- session_
tracker - Network session lifecycle tracking for streaming connections.
- smpte2110
- SMPTE ST 2110 professional media over IP.
- smpte2022_
7 - SMPTE ST 2022-7 seamless protection switching (dual-path redundancy).
- srt
- SRT (Secure Reliable Transport) protocol implementation.
- srt_
aes256gcm - SRT AES-256-GCM authenticated encryption layer.
- srt_
config - High-level SRT connection configuration and state machine.
- srt_
group - SRT Group connection manager.
- srt_
pacing - Packet pacing for SRT transport.
- stream_
health_ monitor - Stream health monitoring for live media streams.
- stream_
mux - Stream multiplexer/demultiplexer for combining multiple logical channels over a single transport.
- webrtc
- WebRTC protocol implementation.
- websocket
- WebSocket client implementing RFC 6455.
- whep_
client - WHEP (WebRTC-HTTP Egress Protocol) client signaling.
- whip
- WHIP/WHEP session signaling stubs.
- whip_
whep - WHIP/WHEP client-side signaling for WebRTC ingest and egress.
- zero_
copy_ serve - Zero-copy segment serving for HLS/DASH media servers.
- zixi
- Zixi-compatible broadcast contribution protocol.