@@ -1518,6 +1518,8 @@ fn read_infe<T: Read>(src: &mut BMFFBox<T>) -> Result<ItemInfoEntry> {
1518
1518
Ok ( ItemInfoEntry { item_id, item_type } )
1519
1519
}
1520
1520
1521
+ /// Parse an Item Reference Box
1522
+ /// See ISO 14496-12:2015 § 8.11.12
1521
1523
fn read_iref < T : Read > ( src : & mut BMFFBox < T > ) -> Result < TryVec < SingleItemTypeReferenceBox > > {
1522
1524
let mut item_references = TryVec :: new ( ) ;
1523
1525
let version = read_fullbox_version_no_flags ( src) ?;
@@ -1555,6 +1557,8 @@ fn read_iref<T: Read>(src: &mut BMFFBox<T>) -> Result<TryVec<SingleItemTypeRefer
1555
1557
Ok ( item_references)
1556
1558
}
1557
1559
1560
+ /// Parse an Item Properties Box
1561
+ /// See ISO 23008-12:2017 § 9.3.1
1558
1562
fn read_iprp < T : Read > ( src : & mut BMFFBox < T > ) -> Result < TryVec < AssociatedProperty > > {
1559
1563
let mut iter = src. box_iter ( ) ;
1560
1564
@@ -1605,6 +1609,7 @@ fn read_iprp<T: Read>(src: &mut BMFFBox<T>) -> Result<TryVec<AssociatedProperty>
1605
1609
Ok ( associated)
1606
1610
}
1607
1611
1612
+ /// See ISO 23008-12:2017 § 9.3.1
1608
1613
#[ derive( Debug , PartialEq ) ]
1609
1614
pub enum ItemProperty {
1610
1615
Channels ( TryVec < u8 > ) ,
@@ -1622,12 +1627,16 @@ impl TryClone for ItemProperty {
1622
1627
}
1623
1628
}
1624
1629
1630
+ /// For storing ItemPropertyAssociation data
1631
+ /// See ISO 23008-12:2017 § 9.3.1
1625
1632
struct Association {
1626
1633
item_id : u32 ,
1627
1634
essential : bool ,
1628
1635
property_index : u16 ,
1629
1636
}
1630
1637
1638
+ /// For storing ItemPropertiesBox data
1639
+ /// See ISO 23008-12:2017 § 9.3.1
1631
1640
pub struct AssociatedProperty {
1632
1641
pub item_id : u32 ,
1633
1642
pub property : ItemProperty ,
@@ -1663,6 +1672,8 @@ fn read_ipma<T: Read>(
1663
1672
Ok ( associations)
1664
1673
}
1665
1674
1675
+ /// Parse an ItemPropertyContainerBox
1676
+ /// See ISO 23008-12:2017 § 9.3.1
1666
1677
fn read_ipco < T : Read > ( src : & mut BMFFBox < T > ) -> Result < TryHashMap < u16 , ItemProperty > > {
1667
1678
let mut properties = TryHashMap :: with_capacity ( 1 ) ?;
1668
1679
@@ -1688,6 +1699,8 @@ fn read_ipco<T: Read>(src: &mut BMFFBox<T>) -> Result<TryHashMap<u16, ItemProper
1688
1699
Ok ( properties)
1689
1700
}
1690
1701
1702
+ /// Parse pixel information
1703
+ /// See ISO 23008-12:2017 § 6.5.6
1691
1704
fn read_pixi < T : Read > ( src : & mut BMFFBox < T > ) -> Result < TryVec < u8 > > {
1692
1705
let version = read_fullbox_version_no_flags ( src) ?;
1693
1706
if version != 0 {
@@ -1706,6 +1719,7 @@ fn read_pixi<T: Read>(src: &mut BMFFBox<T>) -> Result<TryVec<u8>> {
1706
1719
Ok ( channels)
1707
1720
}
1708
1721
1722
+ /// See ISO 23008-12:2017 § 6.5.8
1709
1723
#[ derive( Debug , PartialEq ) ]
1710
1724
pub struct AuxiliaryTypeProperty {
1711
1725
aux_type : TryString ,
@@ -1721,6 +1735,8 @@ impl TryClone for AuxiliaryTypeProperty {
1721
1735
}
1722
1736
}
1723
1737
1738
+ /// Parse image properties for auxiliary images
1739
+ /// See ISO 23008-12:2017 § 6.5.8
1724
1740
fn read_auxc < T : Read > ( src : & mut BMFFBox < T > ) -> Result < AuxiliaryTypeProperty > {
1725
1741
let version = read_fullbox_version_no_flags ( src) ?;
1726
1742
if version != 0 {
0 commit comments