Skip to main content

StreamType

Enum StreamType 

Source
pub enum StreamType {
Show 17 variants Mpeg2Video, AvcVideo, HevcVideo, Vc1Video, LpcmAudio, Ac3Audio, DtsAudio, TruehdAudio, EAc3Audio, DtsHdAudio, DtsHdMaAudio, EAc3SecondaryAudio, DtsHdSecondaryAudio, PgsSubtitle, IgsInteractive, TextSubtitle, Other(u8),
}
Expand description

One elementary-stream codec class.

Variants§

§

Mpeg2Video

0x02 ISO/IEC 13818-2 (MPEG-2 video).

§

AvcVideo

0x1B ITU-T H.264 / ISO/IEC 14496-10 (AVC).

§

HevcVideo

0x24 ITU-T H.265 / ISO/IEC 23008-2 (HEVC).

§

Vc1Video

0xEA SMPTE VC-1 (Microsoft Windows Media Video 9).

§

LpcmAudio

0x80 Linear PCM audio (BD: big-endian, BD-ROM Part 3 §5.4).

§

Ac3Audio

0x81 Dolby AC-3.

§

DtsAudio

0x82 DTS.

§

TruehdAudio

0x83 Dolby TrueHD.

§

EAc3Audio

0x84 Dolby Digital Plus (E-AC-3).

§

DtsHdAudio

0x85 DTS-HD High Resolution.

§

DtsHdMaAudio

0x86 DTS-HD Master Audio.

§

EAc3SecondaryAudio

0xA1 E-AC-3 secondary audio.

§

DtsHdSecondaryAudio

0xA2 DTS-HD secondary audio.

§

PgsSubtitle

0x90 HDMV Presentation Graphic Stream (PGS) subtitles.

§

IgsInteractive

0x91 HDMV Interactive Graphics Stream (IGS).

§

TextSubtitle

0x92 HDMV Text Subtitle Stream (TextST).

§

Other(u8)

Any other value — kept as the raw byte for diagnostics.

Implementations§

Source§

impl StreamType

Source

pub fn from_raw(b: u8) -> Self

Map a raw stream_type byte to the enum.

Source

pub fn as_raw(self) -> u8

Inverse of Self::from_raw.

Source

pub fn is_video(self) -> bool

true when the stream carries primary video.

Source

pub fn is_audio(self) -> bool

true when the stream carries audio (primary or secondary).

Source

pub fn is_subtitle(self) -> bool

true when the stream carries subtitles or interactive graphics.

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