Struct SampleEntryCode

Source
pub struct SampleEntryCode(pub FourCC);
Expand description

Codes identifying sample entries registered with ISO.

The handler() method will give you the code for the handler specified for this kind of sample entry, if a single handler is defined for it by MP4RA.

For example, to test if the sample entry is audio or video,

use mp4ra_rust::HandlerCode;

let sample_entry1 = SampleEntryCode::AVC1;
assert_eq!(sample_entry1.handler(), Some(HandlerCode::VIDE));

let sample_entry2 = SampleEntryCode::MP4A;
assert_eq!(sample_entry2.handler(), Some(HandlerCode::SOUN));

See also,

Tuple Fields§

§0: FourCC

Implementations§

§

impl SampleEntryCode

pub fn handler(&self) -> Option<HandlerCode>

Return the identifier of a handler for this type of sample entry, if a single handler type is defined. For those sample entry types where MP4RA notes there are ‘various’ handlers, this method will return None

§

impl SampleEntryCode

pub const TWO_DCC: SampleEntryCode

2D cartesian coordinates

FourCC: 2dcc

Specification: Metrics

pub const THREE_GLO: SampleEntryCode

3GPP Location

FourCC: 3glo

Specification: 3GPP

pub const THREE_GOR: SampleEntryCode

3GPP Orientation

FourCC: 3gor

Specification: 3GPP

pub const THREE_GVO: SampleEntryCode

3GPP Video Orientation

FourCC: 3gvo

Specification: 3GPP

pub const SIX_VPT: SampleEntryCode

Dynamic viewport data

FourCC: 6vpt

Specification: V3C-SYS

pub const A3D1: SampleEntryCode

3D-AVC track with 3D-AVC NAL units only

FourCC: a3d1

Specification: NALu Video

pub const A3D2: SampleEntryCode

3D-AVC track with 3D-AVC NAL units only

FourCC: a3d2

Specification: NALu Video

pub const A3D3: SampleEntryCode

3D-AVC track with 3D-AVC NAL units only

FourCC: a3d3

Specification: NALu Video

pub const A3D4: SampleEntryCode

3D-AVC track with 3D-AVC NAL units only

FourCC: a3d4

Specification: NALu Video

pub const A3DS: SampleEntryCode

Auro-Cx 3D audio

FourCC: a3ds

Specification: Auro

pub const AC_3: SampleEntryCode

AC-3 audio

FourCC: ac-3

Specification: ETSI AC-3

pub const AC_4: SampleEntryCode

AC-4 audio

FourCC: ac-4

Specification: ETSI AC-4

pub const ALAC: SampleEntryCode

Apple lossless audio codec

FourCC: alac

Specification: Apple

pub const ALAW: SampleEntryCode

a-Law

FourCC: alaw

Specification: QT

pub const AV01: SampleEntryCode

AOM Video Codec

FourCC: av01

Specification: AV1-ISOBMFF

pub const AVC1: SampleEntryCode

Advanced Video Coding

FourCC: avc1

Specification: NALu Video

pub const AVC2: SampleEntryCode

Advanced Video Coding

FourCC: avc2

Specification: NALu Video

pub const AVC3: SampleEntryCode

Advanced Video Coding

FourCC: avc3

Specification: NALu Video

pub const AVC4: SampleEntryCode

Advanced Video Coding

FourCC: avc4

Specification: NALu Video

pub const AVCP: SampleEntryCode

Advanced Video Coding Parameters

FourCC: avcp

Specification: NALu Video

pub const AVST: SampleEntryCode

2nd Generation Audio Video Coding Standard of China (AVS Two)

FourCC: avst

Specification: Avs2

pub const AVS3: SampleEntryCode

3nd Generation Audio Video Coding Standard of China

FourCC: avs3

Specification: Avs3

pub const CAMM: SampleEntryCode

Camera motion metadata track

FourCC: camm

Specification: CamMotion

pub const CAVS: SampleEntryCode

AVS2-P3 codec

FourCC: cavs

Specification: GB-T-20090-9

pub const DAV1: SampleEntryCode

AV1-related Dolby Vision consistent with av01

FourCC: dav1

Specification: Dolby Vision

pub const DRA1: SampleEntryCode

DRA Audio

FourCC: dra1

Specification: DRA

pub const DRAC: SampleEntryCode

Dirac Video Coder

FourCC: drac

Specification: Dirac

pub const DTS_PLUS: SampleEntryCode

Enhancement layer for DTS layered audio

FourCC: dts+

Specification: DTS

pub const DTS_: SampleEntryCode

Dependent base layer for DTS layered audio

FourCC: dts-

Specification: DTS

pub const DTSC: SampleEntryCode

Core Substream

FourCC: dtsc

Specification: DTS-HD

pub const DTSE: SampleEntryCode

Extension Substream containing only LBR

FourCC: dtse

Specification: DTS-HD

pub const DTSH: SampleEntryCode

Core Substream + Extension Substream

FourCC: dtsh

Specification: DTS-HD

pub const DTSL: SampleEntryCode

Extension Substream containing only XLL

FourCC: dtsl

Specification: DTS-HD

pub const DTSX: SampleEntryCode

DTS-UHD profile 2

FourCC: dtsx

Specification: DTS-UHD

pub const DTSY: SampleEntryCode

DTS-UHD profile 3 or higher

FourCC: dtsy

Specification: DTS-UHD

pub const DVA1: SampleEntryCode

AVC-based Dolby Vision derived from avc1

FourCC: dva1

Specification: Dolby Vision

pub const DVAV: SampleEntryCode

AVC-based Dolby Vision derived from avc3

FourCC: dvav

Specification: Dolby Vision

pub const DVH1: SampleEntryCode

HEVC-based Dolby Vision derived from hvc1

FourCC: dvh1

Specification: Dolby Vision

pub const DVHE: SampleEntryCode

HEVC-based Dolby Vision derived from hev1

FourCC: dvhe

Specification: Dolby Vision

pub const DYOL: SampleEntryCode

Dynamic overlay parameters

FourCC: dyol

Specification: OMAF

pub const DYVM: SampleEntryCode

Dynamic spatial region data

FourCC: dyvm

Specification: V3C-SYS

pub const DYVP: SampleEntryCode

Dynamic viewpoint parameters

FourCC: dyvp

Specification: OMAF

pub const EC_3: SampleEntryCode

Enhanced AC-3 audio

FourCC: ec-3

Specification: ETSI AC-3

pub const EC_PLUS_3: SampleEntryCode

withdrawn, unused, do not use (was enhanced AC-3 audio with JOC)

FourCC: ec+3

Specification: Deprecated

pub const ENCA: SampleEntryCode

Encrypted/Protected audio

FourCC: enca

Specification: ISO

pub const ENCF: SampleEntryCode

Encrypted/Protected font

FourCC: encf

Specification: ISO

pub const ENCM: SampleEntryCode

Encrypted/Protected metadata

FourCC: encm

Specification: ISO

pub const ENCS: SampleEntryCode

Encrypted Systems stream

FourCC: encs

Specification: ISO

pub const ENCT: SampleEntryCode

Encrypted Text

FourCC: enct

Specification: ISO

pub const ENCV: SampleEntryCode

Encrypted/protected video

FourCC: encv

Specification: ISO

pub const EVC1: SampleEntryCode

Essential Video Coding

FourCC: evc1

Specification: NALu Video

pub const EVM1: SampleEntryCode

Essential Video Coding slice base track

FourCC: evm1

Specification: NALu Video

pub const EVS1: SampleEntryCode

Essential Video Coding slice component track without parameter sets

FourCC: evs1

Specification: NALu Video

pub const EVS2: SampleEntryCode

Essential Video Coding slice component track that may contain parameter sets

FourCC: evs2

Specification: NALu Video

pub const FDP: SampleEntryCode

File delivery hints

FourCC: fdp

Specification: ISO

pub const FFV1: SampleEntryCode

An open lossless intra-frame video codec

FourCC: FFV1

Specification: FF Video Codec

pub const FLAC: SampleEntryCode

Free Lossless Audio Codec (FLAC)

FourCC: fLaC

Specification: FLAC

pub const G719: SampleEntryCode

ITU-T Recommendation G.719 (2008)

FourCC: g719

Specification: ITU G.719

pub const G726: SampleEntryCode

ITU-T Recommendation G.726 (1990)

FourCC: g726

Specification: SDV

pub const HEV1: SampleEntryCode

HEVC video with parameter sets in the Sample Entry or samples

FourCC: hev1

Specification: NALu Video

pub const HEV2: SampleEntryCode

HEVC video with constrained extractors and/or aggregators and parameter sets in the Sample Entry or samples

FourCC: hev2

Specification: NALu Video

pub const HEV3: SampleEntryCode

HEVC video with extractors and/or aggregators and parameter sets in the Sample Entry or samples

FourCC: hev3

Specification: NALu Video

pub const HVC1: SampleEntryCode

HEVC video with parameter sets only in the Sample Entry

FourCC: hvc1

Specification: NALu Video

pub const HVC2: SampleEntryCode

HEVC video with constrained extractors and/or aggregators and parameter sets only in the Sample Entry

FourCC: hvc2

Specification: NALu Video

pub const HVC3: SampleEntryCode

HEVC video with extractors and/or aggregators and parameter sets only in the Sample Entry

FourCC: hvc3

Specification: NALu Video

pub const HVT1: SampleEntryCode

HEVC tile tracks

FourCC: hvt1

Specification: NALu Video

pub const HVT2: SampleEntryCode

HEVC slice segment data track

FourCC: hvt2

Specification: NALu Video

pub const HVT3: SampleEntryCode

HEVC Tile Track with Slice Segment Header Info

FourCC: hvt3

Specification: NALu Video

pub const ICPV: SampleEntryCode

Incomplete video

FourCC: icpv

Specification: ISO

pub const INVO: SampleEntryCode

Initial viewing orientation

FourCC: invo

Specification: OMAF

pub const INVP: SampleEntryCode

Initial viewpoint

FourCC: invp

Specification: OMAF

pub const IXSE: SampleEntryCode

DVB Track Level Index Track

FourCC: ixse

Specification: DVB

pub const J2KI: SampleEntryCode

Sequence of JPEG 2000 Contiguous Codestream boxes as defined in Rec. ITU-T T.800 | ISO/IEC 15444-1

FourCC: j2ki

Specification: J2KHEIF

pub const JXSM: SampleEntryCode

Video and image sequences coded to the JPEG-XS coding format

FourCC: jxsm

Specification: JPXS

pub const LHE1: SampleEntryCode

Layered HEVC

FourCC: lhe1

Specification: NALu Video

pub const LHT1: SampleEntryCode

Layered HEVC tile tracks

FourCC: lht1

Specification: NALu Video

pub const LHV1: SampleEntryCode

Layered HEVC

FourCC: lhv1

Specification: NALu Video

pub const M2TS: SampleEntryCode

MPEG-2 transport stream for DMB

FourCC: m2ts

Specification: DMB-MAF

pub const M4AE: SampleEntryCode

MPEG-4 Audio Enhancement

FourCC: m4ae

Specification: MP4v2

pub const MEBX: SampleEntryCode

Timed metadata multiplex

FourCC: mebx

Specification: ISO

pub const METT: SampleEntryCode

Text timed metadata that is not XML

FourCC: mett

Specification: ISO

pub const METX: SampleEntryCode

XML timed metadata

FourCC: metx

Specification: ISO

pub const MHA1: SampleEntryCode

MPEG-H Audio (single stream, unencapsulated)

FourCC: mha1

Specification: MPEG-H

pub const MHA2: SampleEntryCode

MPEG-H Audio (multi-stream, unencapsulated)

FourCC: mha2

Specification: MPEG-H

pub const MHM1: SampleEntryCode

MPEG-H Audio (single stream, MHAS encapsulated)

FourCC: mhm1

Specification: MPEG-H

pub const MHM2: SampleEntryCode

MPEG-H Audio (multi-stream, MHAS encapsulated)

FourCC: mhm2

Specification: MPEG-H

pub const MJP2: SampleEntryCode

Motion JPEG 2000

FourCC: mjp2

Specification: MJ2

pub const MJPG: SampleEntryCode

JPEG image sequences

FourCC: mjpg

Specification: HEIF

pub const MLIX: SampleEntryCode

DVB Movie level index track

FourCC: mlix

Specification: DVB

pub const MLPA: SampleEntryCode

MLP Audio

FourCC: mlpa

Specification: Dolby MLP

pub const MP4A: SampleEntryCode

MPEG-4 Audio

FourCC: mp4a

Specification: MP4v1

pub const MP4S: SampleEntryCode

MPEG-4 Systems

FourCC: mp4s

Specification: MP4v1

pub const MP4V: SampleEntryCode

MPEG-4 Visual

FourCC: mp4v

Specification: MP4v1

pub const MVC1: SampleEntryCode

Multiview coding

FourCC: mvc1

Specification: NALu Video

pub const MVC2: SampleEntryCode

Multiview coding

FourCC: mvc2

Specification: NALu Video

pub const MVC3: SampleEntryCode

Multiview coding

FourCC: mvc3

Specification: NALu Video

pub const MVC4: SampleEntryCode

Multiview coding

FourCC: mvc4

Specification: NALu Video

pub const MVD1: SampleEntryCode

MVD stream

FourCC: mvd1

Specification: NALu Video

pub const MVD2: SampleEntryCode

MVD stream

FourCC: mvd2

Specification: NALu Video

pub const MVD3: SampleEntryCode

MVD stream

FourCC: mvd3

Specification: NALu Video

pub const MVD4: SampleEntryCode

MVD stream

FourCC: mvd4

Specification: NALu Video

pub const OCPC: SampleEntryCode

Object centre points correspondence between viewpoints

FourCC: ocpc

Specification: OMAF

pub const OKSD: SampleEntryCode

OMA Keys

FourCC: oksd

Specification: OMA DRM XBS

pub const OPUS: SampleEntryCode

Opus audio coding

FourCC: Opus

Specification: Opus

pub const PM2T: SampleEntryCode

Protected MPEG-2 Transport

FourCC: pm2t

Specification: ISO

pub const PRTP: SampleEntryCode

Protected RTP Reception

FourCC: prtp

Specification: ISO

pub const RAW: SampleEntryCode

Uncompressed audio

FourCC: raw

Specification: MJ2

pub const RCVP: SampleEntryCode

Recommended viewport without indicating a viewpoint

FourCC: rcvp

Specification: OMAF

pub const RESV: SampleEntryCode

Restricted Video

FourCC: resv

Specification: NALu Video

pub const RM2T: SampleEntryCode

MPEG-2 Transport Reception

FourCC: rm2t

Specification: ISO

pub const RRTP: SampleEntryCode

RTP reception

FourCC: rrtp

Specification: ISO

pub const RSRP: SampleEntryCode

SRTP Reception

FourCC: rsrp

Specification: ISO

pub const RTCP: SampleEntryCode

RTCP reception hint track

FourCC: rtcp

Specification: ISO

pub const RTMD: SampleEntryCode

Real Time Metadata Sample Entry(XAVC Format)

FourCC: rtmd

Specification: Sony

pub const RTP: SampleEntryCode

RTP Hints

FourCC: rtp

Specification: ISO

pub const RV60: SampleEntryCode

RealVideo Codec 11

FourCC: rv60

Specification: RealHD

pub const RVP2: SampleEntryCode

Recommended viewport concerning one or more indicated viewpoints

FourCC: rvp2

Specification: OMAF

pub const S263: SampleEntryCode

ITU H.263 video (3GPP format)

FourCC: s263

Specification: 3GPP

pub const SAMR: SampleEntryCode

Narrowband AMR voice

FourCC: samr

Specification: 3GPP

pub const SAWB: SampleEntryCode

Wideband AMR voice

FourCC: sawb

Specification: 3GPP

pub const SAWP: SampleEntryCode

Extended AMR-WB (AMR-WB+)

FourCC: sawp

Specification: 3GPP

pub const SBTT: SampleEntryCode

Text subtitles

FourCC: sbtt

Specification: ISO

pub const SEVC: SampleEntryCode

EVRC Voice

FourCC: sevc

Specification: 3GPP2

pub const SEVS: SampleEntryCode

Enhanced Voice Services (EVS)

FourCC: sevs

Specification: 3GPP

pub const SM2T: SampleEntryCode

MPEG-2 Transport Server

FourCC: sm2t

Specification: ISO

pub const SQCP: SampleEntryCode

13K Voice

FourCC: sqcp

Specification: 3GPP2

pub const SRTP: SampleEntryCode

SRTP Hints

FourCC: srtp

Specification: ISO

pub const SSMV: SampleEntryCode

SMV Voice

FourCC: ssmv

Specification: 3GPP2

pub const STCP: SampleEntryCode

SRTCP reception hint track

FourCC: stcp

Specification: ISO

pub const STGS: SampleEntryCode

Subtitle Sample Entry (HMMP)

FourCC: STGS

Specification: Sony

pub const STMD: SampleEntryCode

Metadata for ERP (equirectangular projection) regions

FourCC: stmd

Specification: OMAF

pub const STPP: SampleEntryCode

Subtitles (Timed Text)

FourCC: stpp

Specification: ISO

pub const STXT: SampleEntryCode

Simple timed text

FourCC: stxt

Specification: ISO

pub const SVC1: SampleEntryCode

Scalable Video Coding

FourCC: svc1

Specification: NALu Video

pub const SVC2: SampleEntryCode

Scalable Video Coding

FourCC: svc2

Specification: NALu Video

pub const SVCM: SampleEntryCode

SVC metadata

FourCC: svcM

Specification: NALu Video

pub const TC64: SampleEntryCode

64 bit timecode samples

FourCC: tc64

Specification: Apple

pub const TMCD: SampleEntryCode

32 bit timecode samples

FourCC: tmcd

Specification: Apple

pub const TTSL: SampleEntryCode

Sphere location for timed text

FourCC: ttsl

Specification: OMAF

pub const TWOS: SampleEntryCode

Uncompressed 16-bit audio

FourCC: twos

Specification: MJ2

pub const TX3G: SampleEntryCode

Timed Text stream

FourCC: tx3g

Specification: 3GPP

pub const ULAW: SampleEntryCode

Samples have been compressed using uLaw 2:1.

FourCC: ulaw

Specification: QT

pub const UNID: SampleEntryCode

Dynamic Range Control (DRC) data

FourCC: unid

Specification: DRC

pub const URIM: SampleEntryCode

Binary timed metadata identified by URI

FourCC: urim

Specification: ISO

pub const V3A1: SampleEntryCode

V3C atlas track with atlas parameter sets only in sample entries

FourCC: v3a1

Specification: V3C-SYS

pub const V3AG: SampleEntryCode

V3C atlas track with atlas parameter sets in sample entries or samples

FourCC: v3ag

Specification: V3C-SYS

pub const V3C1: SampleEntryCode

V3C atlas track with a single atlas and atlas parameter sets only in sample entries

FourCC: v3c1

Specification: V3C-SYS

pub const V3CB: SampleEntryCode

V3C atlas base track with common atlas data

FourCC: v3cb

Specification: V3C-SYS

pub const V3CG: SampleEntryCode

V3C atlas track with a single atlas and atlas parameter sets in sample entries or samples

FourCC: v3cg

Specification: V3C-SYS

pub const V3E1: SampleEntryCode

V3C bitstream track with atlas parameter sets only in sample entries

FourCC: v3e1

Specification: V3C-SYS

pub const V3EG: SampleEntryCode

V3C bitstream track with atlas parameter sets in sample entries or samples

FourCC: v3eg

Specification: V3C-SYS

pub const V3T1: SampleEntryCode

V3C atlas tile track with atlas tile data

FourCC: v3t1

Specification: V3C-SYS

pub const VC_1: SampleEntryCode

SMPTE VC-1

FourCC: vc-1

Specification: SMPTE

pub const VP08: SampleEntryCode

VP8 video

FourCC: vp08

Specification: VPxx

pub const VP09: SampleEntryCode

VP9 video

FourCC: vp09

Specification: VPxx

pub const VRSP: SampleEntryCode

Viewing space

FourCC: vrsp

Specification: OMAF

pub const VVCN: SampleEntryCode

Versatile Video Coding with non-VCL (Video Coding Layer) NAL (Network Abstraction Layer) units only

FourCC: vvcN

Specification: NALu Video

pub const VVC1: SampleEntryCode

Versatile Video Coding with parameter sets only in sample entries

FourCC: vvc1

Specification: NALu Video

pub const VVI1: SampleEntryCode

Versatile Video Coding with parameter sets in sample entries or samples

FourCC: vvi1

Specification: NALu Video

pub const VVS1: SampleEntryCode

Versatile Video Coding (VVC) subpicture track that does not contain a conforming VVC bitstream

FourCC: vvs1

Specification: NALu Video

pub const WVTT: SampleEntryCode

WebVTT data

FourCC: wvtt

Specification: ISO-Text

pub const ENCU: SampleEntryCode

Encrypted/protected subtitles

FourCC: encu

Specification: ISO

pub const ENCP: SampleEntryCode

Encrypted/protected haptics

FourCC: encp

Specification: ISO

pub const ENC3: SampleEntryCode

Encrypted/protected volumetric visual

FourCC: enc3

Specification: ISO

pub const IAMF: SampleEntryCode

Immersive Audio Model and Formats - Encapsulated IA Sequence

FourCC: iamf

Specification: AOM-IAMF

pub const IPCM: SampleEntryCode

Integer based PCM format for audio

FourCC: ipcm

Specification: ISO-UNCA

pub const FPCM: SampleEntryCode

Floating-point based PCM format for audio

FourCC: fpcm

Specification: ISO-UNCA

Source§

impl SampleEntryCode

Source

pub const fn new(code: [u8; 4]) -> SampleEntryCode

Construct a SampleEntryCode from its four-cc value

Trait Implementations§

Source§

impl Clone for SampleEntryCode

Source§

fn clone(&self) -> SampleEntryCode

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for SampleEntryCode

Source§

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

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

impl From<FourCC> for SampleEntryCode

Source§

fn from(val: FourCC) -> Self

Converts to this type from the input type.
Source§

impl From<SampleEntryCode> for FourCC

Source§

fn from(val: SampleEntryCode) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for SampleEntryCode

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 Copy for SampleEntryCode

Source§

impl Eq for SampleEntryCode

Source§

impl StructuralPartialEq for SampleEntryCode

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.