Expand description
Sans-IO RTMP 1.0 ingest (publish) session engine — Adobe Real-Time Messaging Protocol.
Spec grounding: Adobe RTMP 1.0, transcribed at
docs/rtmp.md (handshake §5.2, chunk stream §5.3,
protocol control messages §5.4, message format §6, message types §7.1,
command messages §7.2). AMF0 encoding (used by command/data messages) is
[AMF0] per that same document’s provenance section.
§Scope of this release
This crate implements the ingest (publish-receiving server) side only:
a broadcaster pushes a stream in via connect/createStream/publish,
and this engine drives the handshake and session state machine and hands
back typed audio/video/metadata messages. A client role (for pulling from
or pushing to a remote RTMP server) and an egress (play) server role are
on the roadmap but not implemented yet.
§The sans-IO contract
No sockets live in the core. You drive the engine with bytes and read back
bytes + typed events: feed inbound bytes in, get outbound bytes to write
plus a stream of typed events out — mirroring the
rtsp_runtime sans-IO client/server split
in this same workspace.
An optional tokio socket adapter (feature tokio) drives real
connections over this same core.
§Module map
handshake— the C0/C1/C2 + S0/S1/S2 handshake (§5.2).chunk— the chunk stream: basic header, message header (4fmtvariants), extended timestamp (§5.3).message— RTMP message assembly from chunks, protocol control messages (§5.4), and the message type catalogue (§6, §7.1).amf0— AMF0 value encoding/decoding, used by command and data messages ([AMF0]).server— the ingest server session state machine (connect→createStream→publish, §7.2).io(featuretokio) — the async socket adapter driving the sans-IO server session over a realtokio::net::TcpStream.error— theRtmpErrortype.
The handshake/chunk/message/amf0/server sans-IO engine and the tokio
adapter (feature tokio) are all implemented (#738 Tasks 1-9).
Re-exports§
pub use error::RtmpError;
Modules§
- amf0
- AMF0 (Action Message Format 0) value encoding/decoding, used by RTMP command and data messages.
- chunk
- RTMP chunk stream — basic header, message header, extended timestamp (Adobe RTMP 1.0 §5.3).
- error
- Error type for the RTMP ingest session engine.
- handshake
- RTMP handshake — C0/C1/C2 and S0/S1/S2 (Adobe RTMP 1.0 §5.2).
- io
tokio - Async
tokiosocket adapter driving the sans-IO ingest server session over a realtokio::net::TcpStream— the Layer-2 adapter (seedocs/rtmp.md§ Layer-2 adapter; mirrors thertsp_runtime::iotokio adapter shape in this same workspace). - message
- RTMP message assembly from chunks, protocol control messages, and the message type catalogue (Adobe RTMP 1.0 §5.4, §6, §7.1).
- server
- RTMP ingest server session state machine —
connect→createStream→publish(Adobe RTMP 1.0 §7.2,NetConnection/NetStreamcommands).
Constants§
- RTMP_
VERSION - The Adobe RTMP specification version this engine implements.