#[non_exhaustive]pub enum ByteStreamEncoding {
Show 20 variants
MpegTs,
Matroska,
Ogg,
Flv,
IsoBmff,
Mp4,
Ivf,
MpegPs,
Wav,
Aiff,
Au,
Avi,
Y4m,
Multipart,
Raw,
Rtp,
Srtp,
Rtcp,
Srtcp,
Dtls,
}Expand description
Wire format of a Caps::ByteStream link, so a demuxer accepts only the
container it parses (an MPEG-TS demuxer rejects an arbitrary byte stream
structurally, like the codec/raw split does for video).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MpegTs
MPEG-2 Transport Stream (ISO/IEC 13818-1): 188-byte packets, PAT/PMT, PES. The broadcast / SRT / HLS-segment carrier.
Matroska
Matroska / WebM (EBML): nested variable-length elements; Tracks describe the elementary streams and Clusters carry the SimpleBlock frames. The common file container, WebM being the browser-delivery subset (VP8 / VP9 / AV1 video + Opus / Vorbis audio).
Ogg
Ogg (RFC 3533): “OggS” pages with a segment-table lacing that frames the packets of a logical bitstream. The canonical Opus / Vorbis carrier.
Flv
FLV (Flash Video): an “FLV” header then PreviousTagSize / tag pairs, each
tag a codec-tagged audio / video / script payload. The RTMP carrier.
IsoBmff
ISO Base Media File Format / fragmented MP4 (CMAF): ftyp/moov init then
moof+mdat fragments. The modern HLS/DASH segment container, demuxed by
fmp4demux incrementally (a live stream, no end).
Mp4
Progressive / whole-file MP4 / QuickTime (M479): ftyp + moov (sample
tables) + mdat, in either order. A seekable file rather than a live
stream, so it is demuxed by mp4demux after the whole file is buffered (the
moov may sit at the end, and stco chunk offsets are absolute). The local
.mp4 / .mov case, distinct from the streaming IsoBmff above so the
auto-plugger picks the whole-file demuxer for files and the incremental one
for HLS / DASH.
Ivf
IVF: a 32-byte DKIF header (FourCC codec + geometry + timebase) then a
12-byte size+timestamp header before each frame. The simple raw container
libvpx / libaom conformance vectors ship in (VP8 / VP9 / AV1).
MpegPs
MPEG-1 / MPEG-2 Program Stream (ISO/IEC 13818-1): packs, each a
00 00 01 BA header plus the PES packets that follow it, streams
identified by PES stream_id rather than a PID and a PMT. The .mpg /
.vob file carrier (VCD, SVCD, DVD), demuxed by mpegpsdemux.
Wav
RIFF/WAVE (.wav): a RIFF chunk holding a fmt descriptor and a
data chunk of interleaved PCM. The uncompressed file container, and the
one an audio tool reads without a demuxer.
Aiff
AIFF / AIFC (.aiff / .aif / .aifc): an EA IFF 85 FORM of type
AIFF or AIFC holding a COMM descriptor and an SSND sample chunk.
The Mac / interchange sibling of WAVE, parsed by aiffparse and written
by aiffmux. Multi-byte PCM is big-endian on the wire and swapped to the
little-endian AudioFormat the rest of the graph uses.
Au
Sun / NeXT AU (.au / .snd): a 24-byte big-endian .snd header then
the samples. The Unix sibling of WAVE, parsed by auparse and written by
avmux_au. Multi-byte PCM is big-endian on the wire, same swap as AIFF.
Avi
AVI (.avi): the RIFF sibling of WAVE, a hdrl list describing one
stream per strl and a movi list of the interleaved data chunks, with
an idx1 at the end. Demuxed by avidemux, written by avimux.
Y4m
YUV4MPEG2 (.y4m): a YUV4MPEG2 W.. H.. F.. text header then a FRAME
line before each frame’s planes. The uncompressed video counterpart of
WAV, and what encoders and quality tools exchange raw frames in.
Multipart
MIME multipart (multipart/x-mixed-replace, RFC 2046): a --boundary
line, MIME headers, and a body, repeated. What an IP camera or an
mjpg-streamer-style server pushes MJPEG over HTTP with, demuxed by
multipartdemux and written by multipartmux.
Raw
No container and no framing: a headerless dump whose shape is declared
out of band, the .yuv / .pcm file rawvideoparse / rawaudioparse
frame from their properties. Content sniffing never answers Raw, since
any byte sequence matches it.
Rtp
One complete RTP packet per frame.
Srtp
One complete SRTP packet per frame.
Rtcp
One complete RTCP packet per frame.
Srtcp
One complete SRTCP packet per frame.
Dtls
One datagram per frame carrying DTLS records multiplexed with SRTP and SRTCP, split on the first byte per RFC 7983.
Trait Implementations§
Source§impl Clone for ByteStreamEncoding
impl Clone for ByteStreamEncoding
Source§fn clone(&self) -> ByteStreamEncoding
fn clone(&self) -> ByteStreamEncoding
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more