@@ -35,7 +35,7 @@ use std::io::{Read, Take};
35
35
mod macros;
36
36
37
37
mod boxes;
38
- use crate :: boxes:: { BoxType , FourCC } ;
38
+ pub use crate :: boxes:: { BoxType , FourCC } ;
39
39
40
40
// Unit tests.
41
41
#[ cfg( test) ]
@@ -920,16 +920,16 @@ pub type Result<T, E = Error> = std::result::Result<T, E>;
920
920
///
921
921
/// See ISOBMFF (ISO 14496-12:2020) § 4.2
922
922
#[ derive( Debug , Clone , Copy ) ]
923
- struct BoxHeader {
923
+ pub struct BoxHeader {
924
924
/// Box type.
925
- name : BoxType ,
925
+ pub name : BoxType ,
926
926
/// Size of the box in bytes.
927
- size : u64 ,
927
+ pub size : u64 ,
928
928
/// Offset to the start of the contained data (or header size).
929
- offset : u64 ,
929
+ pub offset : u64 ,
930
930
/// Uuid for extended type.
931
931
#[ allow( dead_code) ] // See https://github.com/mozilla/mp4parse-rust/issues/340
932
- uuid : Option < [ u8 ; 16 ] > ,
932
+ pub uuid : Option < [ u8 ; 16 ] > ,
933
933
}
934
934
935
935
impl BoxHeader {
@@ -2130,21 +2130,21 @@ impl Track {
2130
2130
}
2131
2131
2132
2132
/// See ISOBMFF (ISO 14496-12:2020) § 4.2
2133
- struct BMFFBox < ' a , T : ' a > {
2134
- head : BoxHeader ,
2135
- content : Take < & ' a mut T > ,
2133
+ pub struct BMFFBox < ' a , T : ' a > {
2134
+ pub head : BoxHeader ,
2135
+ pub content : Take < & ' a mut T > ,
2136
2136
}
2137
2137
2138
- struct BoxIter < ' a , T : ' a > {
2138
+ pub struct BoxIter < ' a , T : ' a > {
2139
2139
src : & ' a mut T ,
2140
2140
}
2141
2141
2142
2142
impl < T : Read > BoxIter < ' _ , T > {
2143
- fn new ( src : & mut T ) -> BoxIter < T > {
2143
+ pub fn new ( src : & mut T ) -> BoxIter < T > {
2144
2144
BoxIter { src }
2145
2145
}
2146
2146
2147
- fn next_box ( & mut self ) -> Result < Option < BMFFBox < T > > > {
2147
+ pub fn next_box ( & mut self ) -> Result < Option < BMFFBox < T > > > {
2148
2148
let r = read_box_header ( self . src ) ;
2149
2149
match r {
2150
2150
Ok ( h) => Ok ( Some ( BMFFBox {
@@ -4125,7 +4125,7 @@ fn parse_mvhd<T: Read>(f: &mut BMFFBox<T>) -> Result<Option<MediaTimeScale>> {
4125
4125
/// Note that despite the spec indicating "exactly one" moov box should exist at
4126
4126
/// the file container level, we support reading and merging multiple moov boxes
4127
4127
/// such as with tests/test_case_1185230.mp4.
4128
- fn read_moov < T : Read > (
4128
+ pub fn read_moov < T : Read > (
4129
4129
f : & mut BMFFBox < T > ,
4130
4130
context : Option < MediaContext > ,
4131
4131
strictness : ParseStrictness ,
0 commit comments