How tothtot/media_talk_rust works
This is a Linux network-camera media service. Its main workflow discovers ONVIF cameras, obtains profiles and RTSP stream URIs, ingests camera media, then serves browser playback through a web interface and WebRTC signaling. The README describes an earlier fMP4/MSE path, while sampled GStreamer session code and the browser client show WebRTC as the current playback path; this graph follows the sampled implementation where they differ. It also shows documented device utilities and audio playback. Some server orchestration and unsampled subsystems are represented only where the tree or README supports them.
Main entry points: main.rs CLI entry · src/lib.rs Web server and sessions · session.rs RTSP ingest · src/lib.rs ONVIF discovery
Components 19
CLI and orchestration
- CLI entry
crates/media_talk_rust/src/main.rs - Serve command
crates/media_talk_rust/src/ipc/serve.rs - Discover command
crates/media_talk_rust/src/ipc/discover.rs - Decode benchmark
crates/media_talk_rust/src/ipc/decode_bench.rs
Camera discovery
- ONVIF discovery
crates/ipcam-discovery/src/lib.rs
Media pipeline
- Media types
crates/ipcam-core/src/lib.rs - RTSP ingest
crates/ipcam-gst/src/ingest/session.rs - RTP sender
crates/ipcam-gst/src/rtp_send.rs - RTP receiver
crates/ipcam-gst/src/rtp_recv.rs - Decoder backends
crates/hardware-decode/src/lib.rs
Web playback
- Web server and sessions
crates/web-display/src/lib.rs - WebRTC signaling
crates/ipcam-gst/src/ingest/session.rs
Device utilities
- Audio output
crates/ipcam-gst/src/ingest/session.rs - ALSA devices
crates/ipcam-alsa/src/lib.rs - V4L2 capabilities
crates/v4l2-device-cap/src/lib.rs
Other components
- Operator
- ONVIF camera
- RTSP camera stream
- Browser player
web/play.js
Connections 22
- Operator → CLI entry: invokes
- CLI entry → Serve command: dispatches
- CLI entry → Discover command: dispatches
- CLI entry → Decode benchmark: dispatches
- Serve command → Web server and sessions: starts server
- Discover command → ONVIF discovery: probes cameras
- Web server and sessions → ONVIF discovery: discovers devices
- ONVIF camera → ONVIF discovery: answers probes
- ONVIF discovery → Web server and sessions: returns profiles
- Web server and sessions → RTSP ingest: starts sessions
- RTSP camera stream → RTSP ingest: sends RTSP media
- RTSP ingest → Media types: uses media types
- RTSP ingest → WebRTC signaling: publishes WebRTC
- Browser player → Web server and sessions: requests sessions
- Browser player → WebRTC signaling: consumes streams
- RTP sender → WebRTC signaling: publishes RTP
- RTP receiver → Media types: uses media types
- Decoder backends → Media types: implements decoder
- Audio output → ALSA devices: plays audio
- CLI entry → ALSA devices: lists devices
- CLI entry → V4L2 capabilities: lists capabilities
- Decode benchmark → Decoder backends: benchmarks decode