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
//! RTSP 1.0 server implementation.
//!
//! Provides a complete async RTSP server that:
//! - Accepts TCP connections on a configurable bind address
//! - Handles OPTIONS, DESCRIBE, SETUP, PLAY, PAUSE, TEARDOWN, GET_PARAMETER
//! - Forwards RTP packets to playing clients via TCP-interleaved transport
//! - Manages per-connection session state (Init → Ready → Playing → Paused)
//! - Exposes a [`MountPointRegistry`] for registering stream sources
//!
//! # Quick start
//!
//! ```no_run
//! use std::sync::Arc;
//! use oximedia_net::rtsp::server::{
//! RtspServer, RtspServerConfig, MountPoint, MountPointRegistry,
//! };
//! use oximedia_net::rtsp::SessionDescription;
//!
//! # async fn run() -> Result<(), Box<dyn std::error::Error>> {
//! let server = RtspServer::new(RtspServerConfig {
//! bind_address: "0.0.0.0:8554".into(),
//! ..Default::default()
//! });
//!
//! // Register a stream source.
//! let sdp = SessionDescription::for_rtsp_stream(
//! "127.0.0.1", 96, "H264", 90000, None, None, None, None,
//! ).to_string();
//! let (mp, _rx) = MountPoint::new("/stream".into(), sdp);
//! let mp = server.registry().register(mp);
//!
//! // Publish RTP packets (e.g. from an encoder thread):
//! // mp.publish(Arc::new(rtp_bytes));
//! let _ = mp;
//!
//! server.run().await?;
//! # Ok(()) }
//! ```
pub use ServerChallenge;
pub use ServerConnection;
pub use ;
pub use RtspServer;
pub use ;