Skip to main content

StreamType

Enum StreamType 

Source
#[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 0x800xFF 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-trip

A parsed PmtStream.stream_type is already a StreamType — match on it directly.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

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

Source

pub fn from_u8(v: u8) -> Self

Decode from the wire byte. Every byte maps to a variant (lossless).

Source

pub fn to_u8(self) -> u8

Encode to the wire byte. Inverse of from_u8.

Source

pub fn name(self) -> &'static str

Human-readable spec display name.

Trait Implementations§

Source§

impl Clone for StreamType

Source§

fn clone(&self) -> StreamType

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for StreamType

Source§

impl Debug for StreamType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for StreamType

Source§

impl PartialEq for StreamType

Source§

fn eq(&self, other: &StreamType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for StreamType

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for StreamType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DescriptorObject for T
where T: Debug + Any + Send + Sync + Serialize,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Borrow as &dyn Any so the caller can downcast to the concrete type.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> ExtensionObject for T
where T: Debug + Any + Send + Sync + Serialize,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Borrow as &dyn Any so the caller can downcast to the concrete type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

Source§

impl<T> TableObject for T
where T: Debug + Any + Send + Sync + Serialize,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Borrow as &dyn Any so the caller can downcast to the concrete type.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.