Skip to main content

Crate rusty_esp_video

Crate rusty_esp_video 

Source
Expand description

rusty_esp_video — esp_video / esp_h264 / CameraWebServer remade in Rust: MJPEG and H.264 (rusty_h264 embedded) encode, RTP + MJPEG-over-HTTP packetizers, P4 hardware encoder wrap. Memory safe, no_std core.

This is the facade: it re-exports the no_std core and exposes the chip backends under esp. Depend on this crate; reach into the sub-crates only when you are building a backend.

Part of Janus (Remade With Rust). Plan: docs/plans/rusty_esp_video.md.

Modules§

annexb
H.264 Annex-B byte-stream helpers: find NAL units between start codes and split a stream into access units.
encoder
The encoder seam.
esp
Chip backends (esp-hal for Track B, esp-idf for Track A).
esp_core
rusty_esp_core — the shared vocabulary of the Janus ESP family.
mjpeg_http
multipart/x-mixed-replace — the CameraWebServer stream, remade.
mjpeg_reader
The receiving side of crate::mjpeg_http: a streaming parser for a multipart/x-mixed-replace JPEG stream over a caller-owned buffer.
mpegts
An MPEG-2 transport stream mux for H.264 — the container rff -i udp:// and ffmpeg read today, so a device stream can be verified end to end with the tools the house already trusts.
pacer
A frame-rate cap and a byte budget, with honest counters.
packet
The one packet type the media packages share.
policy
Which encoder for which job — the codec policy, as data and one function.
prelude
The names a sketch or firmware wants in scope.
rtp
RTP: the fixed header, payloaders for H.264 (RFC 6184, single NAL unit and FU-A fragmentation) and JPEG (RFC 2435), and the JPEG depayloader that turns RFC 2435 packets back into a JPEG file in a caller buffer.
sink
Where bytes go.
source
Where packets come from.
udp
Raw datagram framing — the Pi-hub UDP recipe, made precise.

Structs§

Choice
The codec a chip should emit for a job, and what the host does after.
EncodedSource
An ImageSource feeding a VideoEncoder, with a frame-rate cap.
EncoderConfig
What a firmware asks an encoder for.
MediaPacket
A coded media packet over borrowed bytes.
Pacer
Admits at most fps frames per second.
Passthrough
The v1 encoder: a JPEG frame from the sensor is already a packet.

Enums§

Codec
The coding of a packet’s bytes.
H264Path
Where the H.264 bytes come from on a given chip.
Job
What the consumer will do with the frames.

Constants§

VERSION
Crate version, for capability manifests and logs.

Traits§

PacketSink
Something that accepts bytes in order.
PacketSource
Something that produces coded packets on demand.
VideoEncoder
Turns frames into coded packets.

Functions§

codec_for
The policy, as a function of the job and the chip.
fmt_u64_pub
Write a decimal u64 into buf; returns the digits as a &str. No alloc. Public for the backend crate’s HTTP responder.