diff --git a/dolby_vision/CHANGELOG.md b/dolby_vision/CHANGELOG.md index c27d68d..2cb5b0d 100644 --- a/dolby_vision/CHANGELOG.md +++ b/dolby_vision/CHANGELOG.md @@ -2,6 +2,7 @@ - Add support for variable length blocks: L8, L9, L10. - Add L9 metadata by default when generating CM v4.0 RPUs. +- Add support for L255 block in DM v1 payload. XML parser: - Improve specific version support up to XML version 5.1.0. diff --git a/dolby_vision/src/c_structs/dm_data.rs b/dolby_vision/src/c_structs/dm_data.rs index 619225c..3b50f18 100644 --- a/dolby_vision/src/c_structs/dm_data.rs +++ b/dolby_vision/src/c_structs/dm_data.rs @@ -23,6 +23,7 @@ pub struct DmData { level10: Level10BlockList, level11: *const ExtMetadataBlockLevel11, level254: *const ExtMetadataBlockLevel254, + level255: *const ExtMetadataBlockLevel255, } #[repr(C)] @@ -78,6 +79,7 @@ impl DmData { self.level1 = Box::into_raw(Box::new(b.clone())) as *const ExtMetadataBlockLevel1 } + ExtMetadataBlock::Level2(_) => {} ExtMetadataBlock::Level3(b) => { self.level3 = Box::into_raw(Box::new(b.clone())) as *const ExtMetadataBlockLevel3 @@ -94,10 +96,12 @@ impl DmData { self.level6 = Box::into_raw(Box::new(b.clone())) as *const ExtMetadataBlockLevel6 } + ExtMetadataBlock::Level8(_) => {} ExtMetadataBlock::Level9(b) => { self.level9 = Box::into_raw(Box::new(b.clone())) as *const ExtMetadataBlockLevel9 } + ExtMetadataBlock::Level10(_) => {} ExtMetadataBlock::Level11(b) => { self.level11 = Box::into_raw(Box::new(b.clone())) as *const ExtMetadataBlockLevel11 @@ -106,7 +110,11 @@ impl DmData { self.level254 = Box::into_raw(Box::new(b.clone())) as *const ExtMetadataBlockLevel254 } - _ => {} + ExtMetadataBlock::Level255(b) => { + self.level255 = + Box::into_raw(Box::new(b.clone())) as *const ExtMetadataBlockLevel255 + } + ExtMetadataBlock::Reserved(_) => {} }; } @@ -133,6 +141,7 @@ impl DmData { self.level10.free(); Box::from_raw(self.level11 as *mut ExtMetadataBlockLevel11); Box::from_raw(self.level254 as *mut ExtMetadataBlockLevel254); + Box::from_raw(self.level255 as *mut ExtMetadataBlockLevel255); } } @@ -151,6 +160,7 @@ impl Default for DmData { level10: Default::default(), level11: null(), level254: null(), + level255: null(), } } } diff --git a/dolby_vision/src/rpu/extension_metadata/blocks/level255.rs b/dolby_vision/src/rpu/extension_metadata/blocks/level255.rs index b3ff6f2..64b3d64 100644 --- a/dolby_vision/src/rpu/extension_metadata/blocks/level255.rs +++ b/dolby_vision/src/rpu/extension_metadata/blocks/level255.rs @@ -6,7 +6,8 @@ use serde::{Deserialize, Serialize}; use super::{ExtMetadataBlock, ExtMetadataBlockInfo}; -/// Metadata level present in CM v2.9 +/// Metadata level optionally present in CM v2.9. +/// Maybe for debugging? #[repr(C)] #[derive(Debug, Default, Clone)] #[cfg_attr(feature = "serde_feature", derive(Deserialize, Serialize))]