Skip to main content

Crate oximedia_net

Crate oximedia_net 

Source
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.