Skip to main content

Crate rusty_esp_video_core

Crate rusty_esp_video_core 

Source
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.

ModuleHolds
packetMediaPacket, Codec — the one packet type the family shares
annexbH.264 Annex-B NAL unit scanning (start codes, IDR and AUD detection)
encoderVideoEncoder, EncoderConfig, the zero-copy JPEG Passthrough
sinkPacketSink and the host/test sinks
sourcePacketSource and EncodedSource — an ImageSource joined to a VideoEncoder, paced
mjpeg_httpmultipart/x-mixed-replace — what a browser opens
mjpeg_readerthe receiving side: a streaming multipart parser over a caller buffer
rtpRTP headers, RFC 6184 H.264 (single NAL + FU-A) and RFC 2435 JPEG payloaders
mpegtsan MPEG-2 transport stream mux (PAT, PMT, PES, PCR) for H.264 — what rff -i udp:// reads today
udpa tiny framing for raw datagrams with a matching reassembler
pacera 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 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§

MediaPacket
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 u64 into buf; returns the digits as a &str. No alloc. Public for the backend crate’s HTTP responder.