1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! # rtsp — RTSP server library for live media streaming
//!
//! A Rust library for publishing live media streams (H.264, with H.265 and
//! MJPEG planned) over the Real-Time Streaming Protocol (RTSP).
//!
//! ## Protocol references
//!
//! | RFC | Topic | How this crate uses it |
//! |-----|-------|----------------------|
//! | [RFC 2326](https://tools.ietf.org/html/rfc2326) | RTSP 1.0 | Request/response parsing, session lifecycle, transport negotiation |
//! | [RFC 3550](https://tools.ietf.org/html/rfc3550) | RTP | Packet header format, SSRC generation, sequence/timestamp semantics |
//! | [RFC 4566](https://tools.ietf.org/html/rfc4566) | SDP | Session description generation for DESCRIBE responses |
//! | [RFC 6184](https://tools.ietf.org/html/rfc6184) | H.264 RTP payload | NAL unit packetization, FU-A fragmentation, SDP fmtp attributes |
//!
//! ## Architecture
//!
//! ```text
//! ┌──────────────────────────────────────────┐
//! │ Adapters (Python / GStreamer / CLI) │
//! ├──────────────────────────────────────────┤
//! │ Server — public API, orchestrator│
//! │ MountRegistry — named stream endpoints │
//! ├──────────────────────────────────────────┤
//! │ Protocol — RTSP parsing, SDP, etc. │
//! │ Session — state machine, transport│
//! ├──────────────────────────────────────────┤
//! │ Transport — TCP signaling, UDP data │
//! │ Media — RTP header, packetizers │
//! └──────────────────────────────────────────┘
//! ```
//!
//! ## Quick start
//!
//! ```no_run
//! use rtsp::Server;
//!
//! let mut server = Server::new("0.0.0.0:8554");
//! server.start().unwrap();
//!
//! // Push H.264 Annex B frames — the server packetizes and delivers via RTP.
//! // server.send_frame(&h264_data, 3000).unwrap();
//! ```
//!
//! ## Crate layout
//!
//! - [`server`] — High-level [`Server`] orchestrator and [`ServerConfig`].
//! - [`mount`] — [`Mount`] (stream endpoint) and [`MountRegistry`].
//! - [`protocol`] — RTSP request/response parsing, method handling, SDP generation.
//! - [`session`] — RTSP session state machine and transport negotiation.
//! - [`transport`] — TCP listener for RTSP signaling, UDP sender for RTP delivery.
//! - [`media`] — [`Packetizer`] trait, RTP header builder, codec implementations.
//! - [`error`] — [`RtspError`] enum and [`Result`] alias.
pub use ;
pub use Packetizer;
pub use ;
pub use ;