[][src]Struct mpeg4_audio_const::AudioObjectType

pub struct AudioObjectType(_);

Represents an audio object type indicator value.

This type can be constructed from a u8,

assert_eq!(AudioObjectType::AAC_LC, AudioObjectType::try_from(2).unwrap());
assert_eq!(2u8, AudioObjectType::AAC_LC.into());

and will accept values that are 'reserved' in the spec,

assert_eq!("RESERVED(95)", format!("{:?}", AudioObjectType::try_from(95).unwrap()));

but disallows values that can't legitimately be represented because they are too large (the maximum representable a-o-t value is 96) and also disallows the 'escape value' (value 31 see AOT_ESCAPE_VALUE) which is used as part of the encoding scheme for the a-o-t field rather than as a distinct field value.

assert_eq!(Err(AudioObjectTypeError::EscapeValue), AudioObjectType::try_from(31));
assert_eq!(Err(AudioObjectTypeError::TooLarge(97)), AudioObjectType::try_from(97));

Implementations

impl AudioObjectType[src]

pub const NULL: AudioObjectType[src]

Null

pub const AAC_MAIN: AudioObjectType[src]

AAC main

pub const AAC_SSR: AudioObjectType[src]

AAC SSR

pub const AAC_LTP: AudioObjectType[src]

AAC LTP

pub const TWIN_VQ: AudioObjectType[src]

TwinVQ

pub const CELP: AudioObjectType[src]

CELP

pub const HVXC: AudioObjectType[src]

HVXC

pub const SBR: AudioObjectType[src]

SBR

pub const AAC_SCALABLE: AudioObjectType[src]

AAC Scalable

pub const AAC_LC: AudioObjectType[src]

AAC LC

pub const TTSI: AudioObjectType[src]

TTSI

pub const MAIN_SYNTHETIC: AudioObjectType[src]

Main synthetic

pub const WAVETABLE_SYNTHESIS: AudioObjectType[src]

Wavetable synthesis

pub const GENERAL_MIDI: AudioObjectType[src]

General MIDI

pub const ALGORITHMIC_SYNTHESIS_AND_AUDIO_FX: AudioObjectType[src]

Algorithmic Synthesis and Audio FX

pub const ER_AAC_LC: AudioObjectType[src]

ER AAC LC

pub const ER_AAC_LTP: AudioObjectType[src]

ER AAC LTP

pub const ER_AAC_SCALABLE: AudioObjectType[src]

ER AAC Scalable

pub const ER_TWIN_VQ: AudioObjectType[src]

ER TwinVQ

pub const ER_BSAC: AudioObjectType[src]

ER BSAC

pub const ER_AAC_LD: AudioObjectType[src]

ER AAC LD

pub const ER_CELP: AudioObjectType[src]

ER CELP

pub const ER_HVXC: AudioObjectType[src]

ER HVXC

pub const ER_HILN: AudioObjectType[src]

ER HILN

pub const ER_PARAMETRIC: AudioObjectType[src]

ER Parametric

pub const SSC: AudioObjectType[src]

SSC

pub const PS: AudioObjectType[src]

PS

pub const MPEG_SURROUND: AudioObjectType[src]

MPEG Surround

pub const LAYER1: AudioObjectType[src]

Layer-1

pub const LAYER3: AudioObjectType[src]

Layer-3

pub const DST: AudioObjectType[src]

DST

pub const ALS: AudioObjectType[src]

ALS

pub const SLS: AudioObjectType[src]

SLS

pub const SLS_NON_CORE: AudioObjectType[src]

SLS non-core

pub const ER_AAC_ELD: AudioObjectType[src]

ER AAC ELD

pub const SMR_SIMPLE: AudioObjectType[src]

SMR Simple

pub const SMR_MAIN: AudioObjectType[src]

SMR Main

pub const USAC: AudioObjectType[src]

Unified Speech and Audio Coding

pub const SAOC: AudioObjectType[src]

Spatial Audio Object Coding

pub const LD_MPEG_SURROUND: AudioObjectType[src]

Low Delay MPEG Surround

pub const SAOC_DE: AudioObjectType[src]

Spatial Audio Object Coding Dialogue Enhancement

pub const AUDIO_SYNC: AudioObjectType[src]

Audio synchronization tool

Trait Implementations

impl Clone for AudioObjectType[src]

impl Copy for AudioObjectType[src]

impl Debug for AudioObjectType[src]

impl Eq for AudioObjectType[src]

impl From<AudioObjectType> for u8[src]

impl PartialEq<AudioObjectType> for AudioObjectType[src]

impl StructuralEq for AudioObjectType[src]

impl StructuralPartialEq for AudioObjectType[src]

impl TryFrom<u8> for AudioObjectType[src]

type Error = AudioObjectTypeError

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.