From 79b0dc9ede708c1991ec83f77fbbec204253a578 Mon Sep 17 00:00:00 2001 From: Folkert Date: Fri, 1 Mar 2024 16:21:36 +0100 Subject: [PATCH] rename variants --- src/levels.rs | 10 +++++----- src/obu.rs | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/levels.rs b/src/levels.rs index 471aa9471..8691508c6 100644 --- a/src/levels.rs +++ b/src/levels.rs @@ -5,11 +5,11 @@ use strum::{EnumCount, FromRepr}; #[repr(u32)] #[derive(Debug, Clone, Copy, PartialEq, Eq, FromRepr)] pub enum ObuMetaType { - OBU_META_HDR_CLL = 1, - OBU_META_HDR_MDCV = 2, - OBU_META_SCALABILITY = 3, - OBU_META_ITUT_T35 = 4, - OBU_META_TIMECODE = 5, + HdrCll = 1, + HdrMdcv = 2, + Scalability = 3, + ItutT32 = 4, + Timecode = 5, } pub type TxfmSize = u8; diff --git a/src/obu.rs b/src/obu.rs index 93db55ec0..836ce016d 100644 --- a/src/obu.rs +++ b/src/obu.rs @@ -2351,7 +2351,7 @@ unsafe fn parse_obus( } match ObuMetaType::from_repr(meta_type) { - Some(ObuMetaType::OBU_META_HDR_CLL) => { + Some(ObuMetaType::HdrCll) => { let debug = debug.named("CLLOBU"); let max_content_light_level = gb.get_bits(16) as c_int; debug.log( @@ -2378,7 +2378,7 @@ unsafe fn parse_obus( max_frame_average_light_level, })); // TODO(kkysen) fallible allocation } - Some(ObuMetaType::OBU_META_HDR_MDCV) => { + Some(ObuMetaType::HdrMdcv) => { let debug = debug.named("MDCVOBU"); let primaries = array::from_fn(|i| { let primary = [gb.get_bits(16) as u16, gb.get_bits(16) as u16]; @@ -2408,7 +2408,7 @@ unsafe fn parse_obus( min_luminance, })); // TODO(kkysen) fallible allocation } - Some(ObuMetaType::OBU_META_ITUT_T35) => { + Some(ObuMetaType::ItutT32) => { let mut payload_size = len as c_int; // Don't take into account all the trailing bits for `payload_size`. while payload_size > 0 && r#in[init_byte_pos + payload_size as usize - 1] == 0 { @@ -2441,7 +2441,7 @@ unsafe fn parse_obus( }))); // TODO(kkysen) fallible allocation } } - Some(ObuMetaType::OBU_META_SCALABILITY | ObuMetaType::OBU_META_TIMECODE) => {} // Ignore metadata OBUs we don't care about. + Some(ObuMetaType::Scalability | ObuMetaType::Timecode) => {} // Ignore metadata OBUs we don't care about. None => { // Print a warning, but don't fail for unknown types. writeln!(c.logger, "Unknown Metadata OBU type {meta_type}");