Expand description
rusty_esp_video-core — the pure heart of rusty_esp_video.
Espressif’s video stack (esp_video, esp_h264, the CameraWebServer
stream, the ESP-WebRTC capture pipeline) remade as one seam and a set of
packetizers: a frame goes into a VideoEncoder and comes out as a
MediaPacket; a packetizer turns packets into bytes a browser, rff,
a Pi hub or the mesh can read; a PacketSink is wherever those bytes go.
| Module | Holds |
|---|---|
packet | MediaPacket, Codec — the one packet type the family shares |
annexb | H.264 Annex-B NAL unit scanning (start codes, IDR and AUD detection) |
encoder | VideoEncoder, EncoderConfig, the zero-copy JPEG Passthrough |
sink | PacketSink and the host/test sinks |
source | PacketSource and EncodedSource — an ImageSource joined to a VideoEncoder, paced |
mjpeg_http | multipart/x-mixed-replace — what a browser opens |
mjpeg_reader | the receiving side: a streaming multipart parser over a caller buffer |
rtp | RTP headers, RFC 6184 H.264 (single NAL + FU-A) and RFC 2435 JPEG payloaders |
mpegts | an MPEG-2 transport stream mux (PAT, PMT, PES, PCR) for H.264 — what rff -i udp:// reads today |
udp | a tiny framing for raw datagrams with a matching reassembler |
pacer | a frame-rate cap with drop counters |
Rules (from the package plan): encoders write into caller buffers;
packetizers stream MTU-sized pieces into a sink without an intermediate
Vec; everything is testable on the host and gated against rff and
ffmpeg where a bitstream is produced.
Re-exports§
pub use encoder::EncoderConfig;pub use encoder::Passthrough;pub use encoder::VideoEncoder;pub use pacer::Pacer;pub use policy::Choice;pub use policy::H264Path;pub use policy::Job;pub use policy::codec_for;pub use sink::PacketSink;pub use source::EncodedSource;pub use source::PacketSource;pub use rusty_esp_core as esp_core;
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.
- http
- The camera page’s HTTP, with no socket in it.
- mjpeg_
http multipart/x-mixed-replace— the CameraWebServer stream, remade.- mjpeg_
reader - The receiving side of
crate::mjpeg_http: a streaming parser for amultipart/x-mixed-replaceJPEG stream over a caller-owned buffer. - mpegts
- An MPEG-2 transport stream mux for H.264 — the container
rff -i udp://andffmpegread 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§
- Media
Packet - A coded media packet over borrowed bytes.
Enums§
- Codec
- The coding of a packet’s bytes.
Constants§
- VERSION
- Crate version, for capability manifests and logs.
Functions§
- fmt_
u64_ pub - Write a decimal
u64intobuf; returns the digits as a&str. Noalloc. Public for the backend crate’s HTTP responder.