#[non_exhaustive]pub enum StreamType {
Show 60 variants
Reserved,
Mpeg1Video,
Mpeg2Video,
Mpeg1Audio,
Mpeg2Audio,
PrivateSections,
PesPrivateData,
Mheg,
DsmCc,
H222_1,
Iso13818_6TypeA,
Iso13818_6TypeB,
Iso13818_6TypeC,
Iso13818_6TypeD,
Auxiliary,
AacAdts,
Mpeg4Video,
AacLatm,
SlFlexMuxPes,
SlFlexMuxSections,
SyncDownload,
MetadataPes,
MetadataSections,
MetadataDataCarousel,
MetadataObjectCarousel,
MetadataSyncDownload,
Ipmp,
H264,
Iso14496_3Audio,
Iso14496_17Text,
AuxiliaryVideo,
Svc,
Mvc,
Jpeg2000,
AdditionalViewH262,
AdditionalViewH264,
Hevc,
HevcTemporalSubset,
Mvcd,
Temi,
HevcAnnexG,
HevcAnnexGTemporal,
HevcAnnexH,
HevcAnnexHTemporal,
GreenAccessUnits,
MhasAudioMain,
MhasAudioAux,
QualityAccessUnits,
MediaOrchestration,
MctsHevc,
JpegXs,
Vvc,
VvcTemporalSubset,
Evc,
Ac3,
Scte35,
EAc3,
IpmpHigh,
ReservedRange(u8),
UserPrivate(u8),
}Expand description
Stream type coding — Rec. ITU-T H.222.0 (06/2021) Table 2-34.
Identifies the elementary-stream type carried in the associated PID.
Values 0x80–0xFF are user private; only well-established entries
cited to their own specs are named — the rest fall through to
UserPrivate.
§Examples
use dvb_si::tables::pmt::StreamType;
assert_eq!(StreamType::from_u8(0x02).name(), "MPEG-2 Video");
assert_eq!(StreamType::from_u8(0x1B).to_u8(), 0x1B); // H.264, lossless round-tripA parsed PmtStream.stream_type is already a StreamType — match on it directly.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Reserved
0x00 — ITU-T | ISO/IEC Reserved.
Mpeg1Video
0x01 — ISO/IEC 11172-2 Video (MPEG-1 video).
Mpeg2Video
0x02 — Rec. ITU-T H.262 | ISO/IEC 13818-2 Video (MPEG-2 video).
Mpeg1Audio
0x03 — ISO/IEC 11172-3 Audio (MPEG-1 audio).
Mpeg2Audio
0x04 — ISO/IEC 13818-3 Audio (MPEG-2 audio).
PrivateSections
0x05 — Rec. ITU-T H.222.0 | ISO/IEC 13818-1 private_sections.
PesPrivateData
0x06 — Rec. ITU-T H.222.0 | ISO/IEC 13818-1 PES packets containing private data.
Mheg
0x07 — ISO/IEC 13522 MHEG.
DsmCc
0x08 — Rec. ITU-T H.222.0 | ISO/IEC 13818-1 Annex A DSM-CC.
H222_1
0x09 — Rec. ITU-T H.222.1.
Iso13818_6TypeA
0x0A — ISO/IEC 13818-6 type A.
Iso13818_6TypeB
0x0B — ISO/IEC 13818-6 type B.
Iso13818_6TypeC
0x0C — ISO/IEC 13818-6 type C.
Iso13818_6TypeD
0x0D — ISO/IEC 13818-6 type D.
Auxiliary
0x0E — Rec. ITU-T H.222.0 | ISO/IEC 13818-1 auxiliary.
AacAdts
0x0F — ISO/IEC 13818-7 Audio with ADTS transport syntax (AAC).
Mpeg4Video
0x10 — ISO/IEC 14496-2 Visual (MPEG-4 video).
AacLatm
0x11 — ISO/IEC 14496-3 Audio with LATM transport syntax (AAC LATM).
SlFlexMuxPes
0x12 — ISO/IEC 14496-1 SL-packetized / FlexMux stream in PES.
SlFlexMuxSections
0x13 — ISO/IEC 14496-1 SL-packetized / FlexMux stream in sections.
SyncDownload
0x14 — ISO/IEC 13818-6 Synchronized Download Protocol.
MetadataPes
0x15 — Metadata carried in PES packets.
MetadataSections
0x16 — Metadata carried in metadata_sections.
MetadataDataCarousel
0x17 — Metadata carried in ISO/IEC 13818-6 Data Carousel.
MetadataObjectCarousel
0x18 — Metadata carried in ISO/IEC 13818-6 Object Carousel.
MetadataSyncDownload
0x19 — Metadata carried in ISO/IEC 13818-6 Synchronized Download Protocol.
Ipmp
0x1A — IPMP stream (ISO/IEC 13818-11, MPEG-2 IPMP).
H264
0x1B — AVC video stream (Rec. ITU-T H.264 | ISO/IEC 14496-10).
Iso14496_3Audio
0x1C — ISO/IEC 14496-3 Audio without additional transport syntax (DST, ALS, SLS).
Iso14496_17Text
0x1D — ISO/IEC 14496-17 Text.
AuxiliaryVideo
0x1E — Auxiliary video stream (ISO/IEC 23002-3).
Svc
0x1F — SVC video sub-bitstream of an AVC video stream (H.264 Annex G).
Mvc
0x20 — MVC video sub-bitstream of an AVC video stream (H.264 Annex H).
Jpeg2000
0x21 — JPEG 2000 video (Rec. ITU-T T.800 | ISO/IEC 15444-1).
AdditionalViewH262
0x22 — Additional view H.262 | ISO/IEC 13818-2 video for service-compatible stereoscopic 3D.
AdditionalViewH264
0x23 — Additional view H.264 | ISO/IEC 14496-10 video for service-compatible stereoscopic 3D.
Hevc
0x24 — Rec. ITU-T H.265 | ISO/IEC 23008-2 video (HEVC) or HEVC temporal sub-bitstream.
HevcTemporalSubset
0x25 — HEVC temporal video subset (H.265 Annex A profiles).
Mvcd
0x26 — MVCD video sub-bitstream of an AVC video stream (H.264 Annex I).
Temi
0x27 — Timeline and External Media Information (TEMI, H.222.0 Annex U).
HevcAnnexG
0x28 — HEVC enhancement sub-partition incl. TemporalId 0 (H.265 Annex G).
HevcAnnexGTemporal
0x29 — HEVC temporal enhancement sub-partition (H.265 Annex G).
HevcAnnexH
0x2A — HEVC enhancement sub-partition incl. TemporalId 0 (H.265 Annex H).
HevcAnnexHTemporal
0x2B — HEVC temporal enhancement sub-partition (H.265 Annex H).
GreenAccessUnits
0x2C — Green access units carried in MPEG-2 sections.
MhasAudioMain
0x2D — ISO/IEC 23008-3 Audio with MHAS transport syntax — main stream.
MhasAudioAux
0x2E — ISO/IEC 23008-3 Audio with MHAS transport syntax — auxiliary stream.
QualityAccessUnits
0x2F — Quality access units carried in sections.
MediaOrchestration
0x30 — Media Orchestration Access Units carried in sections.
MctsHevc
0x31 — MCTS substream of an H.265 | ISO/IEC 23008-2 video stream.
JpegXs
0x32 — JPEG XS video stream (ISO/IEC 21122-2 profiles).
Vvc
0x33 — VVC video stream (Rec. ITU-T H.266 | ISO/IEC 23090-3) or VVC temporal sub-bitstream.
VvcTemporalSubset
0x34 — VVC temporal video subset (H.266 Annex A profiles).
Evc
0x35 — EVC video stream or EVC temporal sub-bitstream (ISO/IEC 23094-1).
Ac3
0x81 — ATSC AC-3 audio (A/52).
Scte35
0x86 — SCTE-35 splice_info_section (ANSI/SCTE 35).
EAc3
0x87 — ATSC E-AC-3 / Dolby Digital Plus audio (A/52B).
IpmpHigh
0x7F — IPMP stream (H.222.0 Table 2-34).
ReservedRange(u8)
Rec. ITU-T H.222.0 reserved range 0x36..=0x7E.
UserPrivate(u8)
User private range 0x80..=0xFF (except named entries).
Implementations§
Source§impl StreamType
impl StreamType
Sourcepub fn from_u8(v: u8) -> Self
pub fn from_u8(v: u8) -> Self
Decode from the wire byte. Every byte maps to a variant (lossless).
Sourcepub fn is_video(self) -> bool
pub fn is_video(self) -> bool
Returns true if this stream_type carries a video elementary stream.
Covers the video-coded stream types defined in Rec. ITU-T H.222.0 | ISO/IEC 13818-1 Table 2-34 (2021 edition):
| Variant | Value | Spec |
|---|---|---|
Mpeg1Video | 0x01 | ISO/IEC 11172-2 |
Mpeg2Video | 0x02 | ITU-T H.262 / ISO/IEC 13818-2 |
Mpeg4Video | 0x10 | ISO/IEC 14496-2 |
H264 | 0x1B | ITU-T H.264 / ISO/IEC 14496-10 |
AuxiliaryVideo | 0x1E | ISO/IEC 23002-3 |
Svc | 0x1F | H.264 Annex G |
Mvc | 0x20 | H.264 Annex H |
Jpeg2000 | 0x21 | ITU-T T.800 / ISO/IEC 15444-1 |
AdditionalViewH262 | 0x22 | H.262 stereoscopic 3D |
AdditionalViewH264 | 0x23 | H.264 stereoscopic 3D |
Hevc | 0x24 | ITU-T H.265 / ISO/IEC 23008-2 |
HevcTemporalSubset | 0x25 | H.265 Annex A |
Mvcd | 0x26 | H.264 Annex I |
HevcAnnexG | 0x28 | H.265 Annex G |
HevcAnnexGTemporal | 0x29 | H.265 Annex G |
HevcAnnexH | 0x2A | H.265 Annex H |
HevcAnnexHTemporal | 0x2B | H.265 Annex H |
MctsHevc | 0x31 | H.265 / ISO/IEC 23008-2 |
JpegXs | 0x32 | ISO/IEC 21122-2 |
Vvc | 0x33 | ITU-T H.266 / ISO/IEC 23090-3 |
VvcTemporalSubset | 0x34 | H.266 Annex A |
Evc | 0x35 | ISO/IEC 23094-1 |
Note on PesPrivateData (0x06): this stream_type alone does not
identify the payload — AC-3, H.264, DVB subtitle, teletext, and others
all share 0x06 and are disambiguated by component/registration descriptors
per ETSI TS 101 154. is_video returns false for PesPrivateData;
callers must inspect the ES_info descriptor loop to resolve the actual
content type.
Sourcepub fn is_audio(self) -> bool
pub fn is_audio(self) -> bool
Returns true if this stream_type carries an audio elementary stream.
Covers the audio-coded stream types defined in Rec. ITU-T H.222.0 | ISO/IEC 13818-1 Table 2-34 (2021 edition):
| Variant | Value | Spec |
|---|---|---|
Mpeg1Audio | 0x03 | ISO/IEC 11172-3 |
Mpeg2Audio | 0x04 | ISO/IEC 13818-3 |
AacAdts | 0x0F | ISO/IEC 13818-7 (AAC in ADTS) |
AacLatm | 0x11 | ISO/IEC 14496-3 (AAC in LATM) |
Iso14496_3Audio | 0x1C | ISO/IEC 14496-3 (raw, no transport syntax) |
MhasAudioMain | 0x2D | ISO/IEC 23008-3 MHAS main |
MhasAudioAux | 0x2E | ISO/IEC 23008-3 MHAS auxiliary |
Ac3 | 0x81 | ATSC A/52 (AC-3) |
EAc3 | 0x87 | ATSC A/52B (E-AC-3 / Dolby Digital Plus) |
Note on PesPrivateData (0x06): this stream_type alone does not
identify the payload — AC-3 carried over DVB uses 0x06 with an
AC-3/enhanced AC-3 descriptor per ETSI TS 101 154. is_audio returns
false for PesPrivateData; callers must inspect the ES_info descriptor
loop to resolve the actual content type.
Sourcepub fn is_subtitle(self) -> bool
pub fn is_subtitle(self) -> bool
Returns true if this stream_type unambiguously carries subtitle/text
content.
Only Iso14496_17Text (0x1D, ISO/IEC 14496-17 timed text) is
unambiguously identified as subtitle/text by the stream_type byte alone.
Note on PesPrivateData (0x06): DVB bitmap subtitles (ETSI EN 300 743)
and DVB teletext (ETSI EN 300 472) both use stream_type 0x06 and are
identified by subtitling / teletext descriptors in the ES_info loop per
ETSI TS 101 154. is_subtitle returns false for PesPrivateData;
callers must inspect the ES_info descriptor loop to resolve the actual
content type.
Sourcepub fn is_data(self) -> bool
pub fn is_data(self) -> bool
Returns true if this stream_type carries data, private sections,
signalling, or metadata — i.e. neither video, audio, nor subtitle.
This includes:
| Variant | Value | Notes |
|---|---|---|
Reserved | 0x00 | ITU-T / ISO reserved |
PrivateSections | 0x05 | private_sections (H.222.0 §2.4.4.10) |
PesPrivateData | 0x06 | descriptor-dependent; see note below |
Mheg | 0x07 | MHEG interactive |
DsmCc | 0x08 | DSM-CC (H.222.0 Annex A) |
H222_1 | 0x09 | H.222.1 |
Iso13818_6TypeA–TypeD | 0x0A–0x0D | ISO/IEC 13818-6 carousel/download |
Auxiliary | 0x0E | H.222.0 auxiliary |
SlFlexMuxPes | 0x12 | SL/FlexMux in PES |
SlFlexMuxSections | 0x13 | SL/FlexMux in sections |
SyncDownload | 0x14 | ISO/IEC 13818-6 Synchronized Download Protocol |
MetadataPes–MetadataSyncDownload | 0x15–0x19 | metadata streams |
Ipmp | 0x1A | IPMP (ISO/IEC 13818-11) |
Temi | 0x27 | Timeline and External Media Information |
GreenAccessUnits | 0x2C | green access units |
QualityAccessUnits | 0x2F | quality access units |
MediaOrchestration | 0x30 | Media Orchestration |
IpmpHigh | 0x7F | IPMP (H.222.0 Table 2-34) |
Scte35 | 0x86 | SCTE-35 splice_info_section |
ReservedRange(_) | 0x36–0x7E | reserved, treated conservatively as data |
UserPrivate(_) | 0x80–0xFF | user private, treated conservatively as data |
Note on PesPrivateData (0x06): this stream_type is shared by many
DVB content types — AC-3 audio, E-AC-3, DVB subtitles, teletext, and
others — all identified via descriptors per ETSI TS 101 154. This
predicate conservatively classifies 0x06 as data/unknown. Callers that
need to classify 0x06 streams must inspect the ES_info descriptor loop.
Trait Implementations§
Source§impl Clone for StreamType
impl Clone for StreamType
Source§fn clone(&self) -> StreamType
fn clone(&self) -> StreamType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more