Struct mp4ra_rust::ObjectTypeIdentifier
source · pub struct ObjectTypeIdentifier(pub u8);
Expand description
Object Type Identification values.
See also,
§Conversions to and from u8
Conversion to or from u8
will work for any value.
assert_eq!(ObjectTypeIdentifier::VISUAL_ISO_IEC_13818_2_MAIN_PROFILE, 0x61.into());
assert_eq!(0x61u8, ObjectTypeIdentifier::VISUAL_ISO_IEC_13818_2_MAIN_PROFILE.into());
§Debug
implementation
The implementation of Debug
tries to be helpful,
assert_eq!(
"VISUAL_ISO_IEC_13818_2_MAIN_PROFILE(0x61)",
format!("{:?}", ObjectTypeIdentifier::VISUAL_ISO_IEC_13818_2_MAIN_PROFILE)
);
§Identifier values without provided constants
Constants are not provided for the range of values that the spec notes are reserved, but you are still able to create ObjectTypeIdentification instances taking these values for the sake of forward compatibility.
The spec also notes that some identifier values have been withdrawn and are deprecated. Constants are not provided for these either.
Finally, some values are marked for user private use, meaning that future versions of the spec will avoid using these values.
While there are no specific constants for any of these, the implementation of Debug
still
gives them special treatment,
assert_eq!("RESERVED(0x0b)", format!("{:?}", ObjectTypeIdentifier::from(0x0b)));
assert_eq!("WITHDRAWN(0xa5)", format!("{:?}", ObjectTypeIdentifier::from(0xa5)));
assert_eq!("USER_PRIVATE(0xc0)", format!("{:?}", ObjectTypeIdentifier::from(0xc0)))
§Defining constants
You may define your own constant values. For example for application specific values that the
spec puts in the user private range. Note however that you can’t change the output which
the Debug
implementation produces for these values.
const MY_SPECIAL_OBJECT_TYPE: ObjectTypeIdentifier = ObjectTypeIdentifier(0xc1);
match other_oti {
MY_SPECIAL_OBJECT_TYPE => println!("special object"),
_ => println!("other type"),
}
// can't customise this "USER_PRIVATE" text,
assert_eq!("USER_PRIVATE(0xc1)", format!("{:?}", MY_SPECIAL_OBJECT_TYPE))
Tuple Fields§
§0: u8
Implementations§
§impl ObjectTypeIdentifier
impl ObjectTypeIdentifier
pub const FORBIDDEN: ObjectTypeIdentifier = _
pub const FORBIDDEN: ObjectTypeIdentifier = _
Forbidden
Type value: 0x00
pub const SYSTEMS_ISO_IEC_14496_1: ObjectTypeIdentifier = _
pub const SYSTEMS_ISO_IEC_14496_1: ObjectTypeIdentifier = _
Systems ISO/IEC 14496-1
Type value: 0x01
Specification: MPEG-4
pub const SYSTEMS_ISO_IEC_14496_1_BIFS_V_2_CONFIG: ObjectTypeIdentifier = _
pub const SYSTEMS_ISO_IEC_14496_1_BIFS_V_2_CONFIG: ObjectTypeIdentifier = _
Systems ISO/IEC 14496-1
Type value: 0x02
Specification: MPEG-4
pub const INTERACTION_STREAM: ObjectTypeIdentifier = _
pub const INTERACTION_STREAM: ObjectTypeIdentifier = _
Interaction Stream
Type value: 0x03
Specification: MPEG-4
pub const EXTENDED_BIFS: ObjectTypeIdentifier = _
pub const EXTENDED_BIFS: ObjectTypeIdentifier = _
Extended BIFS
Type value: 0x04
Specification: MPEG-4
pub const AFX_STREAM: ObjectTypeIdentifier = _
pub const AFX_STREAM: ObjectTypeIdentifier = _
AFX Stream
Type value: 0x05
Specification: MPEG-4
pub const FONT_DATA_STREAM: ObjectTypeIdentifier = _
pub const FONT_DATA_STREAM: ObjectTypeIdentifier = _
Font Data Stream
Type value: 0x06
Specification: MPEG-4
pub const SYNTHETISED_TEXTURE: ObjectTypeIdentifier = _
pub const SYNTHETISED_TEXTURE: ObjectTypeIdentifier = _
Synthetised Texture
Type value: 0x07
Specification: MPEG-4
pub const TEXT_STREAM: ObjectTypeIdentifier = _
pub const TEXT_STREAM: ObjectTypeIdentifier = _
Text Stream
Type value: 0x08
Specification: MPEG-4
pub const LA_SE_R_STREAM: ObjectTypeIdentifier = _
pub const LA_SE_R_STREAM: ObjectTypeIdentifier = _
LASeR Stream
Type value: 0x09
Specification: MPEG-4
pub const SIMPLE_AGGREGATION_FORMAT_STREAM: ObjectTypeIdentifier = _
pub const SIMPLE_AGGREGATION_FORMAT_STREAM: ObjectTypeIdentifier = _
Simple Aggregation Format Stream
Type value: 0x0A
Specification: MPEG-4
pub const VISUAL_ISO_IEC_14496_2: ObjectTypeIdentifier = _
pub const VISUAL_ISO_IEC_14496_2: ObjectTypeIdentifier = _
Visual ISO/IEC 14496-2
Type value: 0x20
Specification: MPEG-4
pub const VISUAL_ITU_T_RECOMMENDATION_H_264_ISO_IEC_14496_10: ObjectTypeIdentifier = _
pub const VISUAL_ITU_T_RECOMMENDATION_H_264_ISO_IEC_14496_10: ObjectTypeIdentifier = _
Visual ITU-T Recommendation H.264 | ISO/IEC 14496-10
Type value: 0x21
Specification: MPEG-4
pub const PARAMETER_SETS_FOR_ITU_T_RECOMMENDATION_H_264_ISO_IEC_14496_10: ObjectTypeIdentifier = _
pub const PARAMETER_SETS_FOR_ITU_T_RECOMMENDATION_H_264_ISO_IEC_14496_10: ObjectTypeIdentifier = _
Parameter Sets for ITU-T Recommendation H.264 | ISO/IEC 14496-10
Type value: 0x22
Specification: MPEG-4
pub const VISUAL_ISO_IEC_23008_2_ITU_T_RECOMMENDATION_H_265: ObjectTypeIdentifier = _
pub const VISUAL_ISO_IEC_23008_2_ITU_T_RECOMMENDATION_H_265: ObjectTypeIdentifier = _
Visual ISO/IEC 23008-2 | ITU-T Recommendation H.265
Type value: 0x23
Specification: MPEG-4
pub const AUDIO_ISO_IEC_14496_3: ObjectTypeIdentifier = _
pub const AUDIO_ISO_IEC_14496_3: ObjectTypeIdentifier = _
Audio ISO/IEC 14496-3
Type value: 0x40
Specification: MPEG-4
pub const VISUAL_ISO_IEC_13818_2_SIMPLE_PROFILE: ObjectTypeIdentifier = _
pub const VISUAL_ISO_IEC_13818_2_SIMPLE_PROFILE: ObjectTypeIdentifier = _
Visual ISO/IEC 13818-2 Simple Profile
Type value: 0x60
Specification: MPEG-4
pub const VISUAL_ISO_IEC_13818_2_MAIN_PROFILE: ObjectTypeIdentifier = _
pub const VISUAL_ISO_IEC_13818_2_MAIN_PROFILE: ObjectTypeIdentifier = _
Visual ISO/IEC 13818-2 Main Profile
Type value: 0x61
Specification: MPEG-4
pub const VISUAL_ISO_IEC_13818_2_SNR_PROFILE: ObjectTypeIdentifier = _
pub const VISUAL_ISO_IEC_13818_2_SNR_PROFILE: ObjectTypeIdentifier = _
Visual ISO/IEC 13818-2 SNR Profile
Type value: 0x62
Specification: MPEG-4
pub const VISUAL_ISO_IEC_13818_2_SPATIAL_PROFILE: ObjectTypeIdentifier = _
pub const VISUAL_ISO_IEC_13818_2_SPATIAL_PROFILE: ObjectTypeIdentifier = _
Visual ISO/IEC 13818-2 Spatial Profile
Type value: 0x63
Specification: MPEG-4
pub const VISUAL_ISO_IEC_13818_2_HIGH_PROFILE: ObjectTypeIdentifier = _
pub const VISUAL_ISO_IEC_13818_2_HIGH_PROFILE: ObjectTypeIdentifier = _
Visual ISO/IEC 13818-2 High Profile
Type value: 0x64
Specification: MPEG-4
pub const VISUAL_ISO_IEC_13818_2_422_PROFILE: ObjectTypeIdentifier = _
pub const VISUAL_ISO_IEC_13818_2_422_PROFILE: ObjectTypeIdentifier = _
Visual ISO/IEC 13818-2 422 Profile
Type value: 0x65
Specification: MPEG-4
pub const AUDIO_ISO_IEC_13818_7_MAIN_PROFILE: ObjectTypeIdentifier = _
pub const AUDIO_ISO_IEC_13818_7_MAIN_PROFILE: ObjectTypeIdentifier = _
Audio ISO/IEC 13818-7 Main Profile
Type value: 0x66
Specification: MPEG-4
pub const AUDIO_ISO_IEC_13818_7_LOW_COMPLEXITY_PROFILE: ObjectTypeIdentifier = _
pub const AUDIO_ISO_IEC_13818_7_LOW_COMPLEXITY_PROFILE: ObjectTypeIdentifier = _
Audio ISO/IEC 13818-7 LowComplexity Profile
Type value: 0x67
Specification: MPEG-4
pub const AUDIO_ISO_IEC_13818_7_SCALEABLE_SAMPLING_RATE_PROFILE: ObjectTypeIdentifier = _
pub const AUDIO_ISO_IEC_13818_7_SCALEABLE_SAMPLING_RATE_PROFILE: ObjectTypeIdentifier = _
Audio ISO/IEC 13818-7 Scaleable Sampling Rate Profile
Type value: 0x68
Specification: MPEG-4
pub const AUDIO_ISO_IEC_13818_3: ObjectTypeIdentifier = _
pub const AUDIO_ISO_IEC_13818_3: ObjectTypeIdentifier = _
Audio ISO/IEC 13818-3
Type value: 0x69
Specification: MPEG-4
pub const VISUAL_ISO_IEC_11172_2: ObjectTypeIdentifier = _
pub const VISUAL_ISO_IEC_11172_2: ObjectTypeIdentifier = _
Visual ISO/IEC 11172-2
Type value: 0x6A
Specification: MPEG-4
pub const AUDIO_ISO_IEC_11172_3: ObjectTypeIdentifier = _
pub const AUDIO_ISO_IEC_11172_3: ObjectTypeIdentifier = _
Audio ISO/IEC 11172-3
Type value: 0x6B
Specification: MPEG-4
pub const VISUAL_ISO_IEC_10918_1: ObjectTypeIdentifier = _
pub const VISUAL_ISO_IEC_10918_1: ObjectTypeIdentifier = _
Visual ISO/IEC 10918-1
Type value: 0x6C
Specification: MPEG-4
pub const PORTABLE_NETWORK_GRAPHICS: ObjectTypeIdentifier = _
pub const PORTABLE_NETWORK_GRAPHICS: ObjectTypeIdentifier = _
Portable Network Graphics
Type value: 0x6D
Specification: PNG
pub const VISUAL_ISO_IEC_15444_1: ObjectTypeIdentifier = _
pub const VISUAL_ISO_IEC_15444_1: ObjectTypeIdentifier = _
Visual ISO/IEC 15444-1
Type value: 0x6E
Specification: MPEG-4
pub const EVRC_VOICE: ObjectTypeIdentifier = _
pub const EVRC_VOICE: ObjectTypeIdentifier = _
EVRC Voice
Type value: 0xA0
Specification: 3GPP2
pub const SMV_VOICE: ObjectTypeIdentifier = _
pub const SMV_VOICE: ObjectTypeIdentifier = _
SMV Voice
Type value: 0xA1
Specification: 3GPP2
pub const THREE_GPP_2_COMPACT_MULTIMEDIA_FORMAT: ObjectTypeIdentifier = _
pub const THREE_GPP_2_COMPACT_MULTIMEDIA_FORMAT: ObjectTypeIdentifier = _
3GPP2 Compact Multimedia Format
Type value: 0xA2
Specification: 3GPP2
pub const SMPTE_VC_1_VIDEO: ObjectTypeIdentifier = _
pub const SMPTE_VC_1_VIDEO: ObjectTypeIdentifier = _
SMPTE VC-1 Video
Type value: 0xA3
Specification: SMPTE
pub const DIRAC_VIDEO_CODER: ObjectTypeIdentifier = _
pub const DIRAC_VIDEO_CODER: ObjectTypeIdentifier = _
Dirac Video Coder
Type value: 0xA4
Specification: Dirac
pub const DRA_AUDIO: ObjectTypeIdentifier = _
pub const DRA_AUDIO: ObjectTypeIdentifier = _
DRA Audio
Type value: 0xA7
Specification: DRA
pub const ITU_G_719_AUDIO: ObjectTypeIdentifier = _
pub const ITU_G_719_AUDIO: ObjectTypeIdentifier = _
ITU G.719 Audio
Type value: 0xA8
Specification: ITU G.719
pub const CORE_SUBSTREAM: ObjectTypeIdentifier = _
pub const CORE_SUBSTREAM: ObjectTypeIdentifier = _
Core Substream
Type value: 0xA9
Specification: DTS-HD
pub const CORE_SUBSTREAM_EXTENSION_SUBSTREAM: ObjectTypeIdentifier = _
pub const CORE_SUBSTREAM_EXTENSION_SUBSTREAM: ObjectTypeIdentifier = _
Core Substream + Extension Substream
Type value: 0xAA
Specification: DTS-HD
pub const EXTENSION_SUBSTREAM_CONTAINING_ONLY_XLL: ObjectTypeIdentifier = _
pub const EXTENSION_SUBSTREAM_CONTAINING_ONLY_XLL: ObjectTypeIdentifier = _
Extension Substream containing only XLL
Type value: 0xAB
Specification: DTS-HD
pub const EXTENSION_SUBSTREAM_CONTAINING_ONLY_LBR: ObjectTypeIdentifier = _
pub const EXTENSION_SUBSTREAM_CONTAINING_ONLY_LBR: ObjectTypeIdentifier = _
Extension Substream containing only LBR
Type value: 0xAC
Specification: DTS-HD
pub const OPUS_AUDIO: ObjectTypeIdentifier = _
pub const OPUS_AUDIO: ObjectTypeIdentifier = _
Opus audio
Type value: 0xAD
Specification: Opus
pub const AURO_CX_3_D_AUDIO: ObjectTypeIdentifier = _
pub const AURO_CX_3_D_AUDIO: ObjectTypeIdentifier = _
Auro-Cx 3D audio
Type value: 0xAF
Specification: Auro
pub const REAL_VIDEO_CODEC_11: ObjectTypeIdentifier = _
pub const REAL_VIDEO_CODEC_11: ObjectTypeIdentifier = _
RealVideo Codec 11
Type value: 0xB0
Specification: RealHD
pub const VP_9_VIDEO: ObjectTypeIdentifier = _
pub const VP_9_VIDEO: ObjectTypeIdentifier = _
VP9 Video
Type value: 0xB1
Specification: VPxx
pub const DTS_UHD_PROFILE_2: ObjectTypeIdentifier = _
pub const DTS_UHD_PROFILE_2: ObjectTypeIdentifier = _
DTS-UHD profile 2
Type value: 0xB2
Specification: DTS-UHD
pub const DTS_UHD_PROFILE_3_OR_HIGHER: ObjectTypeIdentifier = _
pub const DTS_UHD_PROFILE_3_OR_HIGHER: ObjectTypeIdentifier = _
DTS-UHD profile 3 or higher
Type value: 0xB3
Specification: DTS-UHD
pub const ONE_3_K_VOICE: ObjectTypeIdentifier = _
pub const ONE_3_K_VOICE: ObjectTypeIdentifier = _
13K Voice
Type value: 0xE1
Specification: 3GPP2
pub const NO_OBJECT_TYPE_SPECIFIED: ObjectTypeIdentifier = _
pub const NO_OBJECT_TYPE_SPECIFIED: ObjectTypeIdentifier = _
no object type specified
Type value: 0xFF
Specification: MPEG-4
Trait Implementations§
source§impl Clone for ObjectTypeIdentifier
impl Clone for ObjectTypeIdentifier
source§fn clone(&self) -> ObjectTypeIdentifier
fn clone(&self) -> ObjectTypeIdentifier
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for ObjectTypeIdentifier
impl Debug for ObjectTypeIdentifier
source§impl From<ObjectTypeIdentifier> for u8
impl From<ObjectTypeIdentifier> for u8
source§fn from(val: ObjectTypeIdentifier) -> Self
fn from(val: ObjectTypeIdentifier) -> Self
source§impl From<u8> for ObjectTypeIdentifier
impl From<u8> for ObjectTypeIdentifier
source§impl PartialEq for ObjectTypeIdentifier
impl PartialEq for ObjectTypeIdentifier
source§fn eq(&self, other: &ObjectTypeIdentifier) -> bool
fn eq(&self, other: &ObjectTypeIdentifier) -> bool
self
and other
values to be equal, and is used
by ==
.