Skip to main content

arcly_stream/protocol/
mod.rs

1//! Reusable protocol scaffolding shared by ingest handlers (RTMP, RTSP, …).
2//!
3//! Gated behind `ingest`. Extracted from `sc-protocol-ingest`, with the global
4//! metrics singleton removed — counters are the caller's concern.
5
6mod ingest;
7
8// Shared panic-free big-endian reader under every network parser. Internal.
9#[cfg(any(feature = "_rtp", feature = "srt", feature = "rtmp"))]
10pub(crate) mod byteops;
11
12// Shared `scheme://host[:port]/path` URL helpers for the egress clients.
13#[cfg(feature = "rtmp")]
14pub(crate) mod url;
15
16// Shared MPEG-TS demuxer for the TS-over-UDP transports (srt, udp). Gated by the
17// internal `_mpegts` marker so either feature compiles it without the other.
18#[cfg(feature = "_mpegts")]
19#[cfg_attr(docsrs, doc(cfg(any(feature = "srt", feature = "udp"))))]
20pub mod tsdemux;
21
22pub use ingest::{
23    find_nal_start, run_tcp_ingest_server, IngestRateLimit, KeyframeGate, NalStart,
24    MAX_AUDIO_FRAME, MAX_VIDEO_FRAME,
25};
26
27#[cfg(feature = "rtmp")]
28#[cfg_attr(docsrs, doc(cfg(feature = "rtmp")))]
29pub mod rtmp;
30
31#[cfg(feature = "_rtp")]
32#[cfg_attr(docsrs, doc(cfg(any(feature = "rtsp", feature = "webrtc"))))]
33pub mod rtp;
34
35#[cfg(feature = "rtsp")]
36#[cfg_attr(docsrs, doc(cfg(feature = "rtsp")))]
37pub mod rtsp;
38
39#[cfg(feature = "srt")]
40#[cfg_attr(docsrs, doc(cfg(feature = "srt")))]
41pub mod srt;
42
43#[cfg(feature = "udp")]
44#[cfg_attr(docsrs, doc(cfg(feature = "udp")))]
45pub mod udp;
46
47#[cfg(feature = "webrtc")]
48#[cfg_attr(docsrs, doc(cfg(feature = "webrtc")))]
49pub mod webrtc;