File tree Expand file tree Collapse file tree 4 files changed +662
-0
lines changed Expand file tree Collapse file tree 4 files changed +662
-0
lines changed Original file line number Diff line number Diff line change 22
33- Move ` MediaFormat ` from ` media::media_codec ` to its own ` media::media_format ` module. (#442 )
44- media_format: Expose ` MediaFormat::copy() ` and ` MediaFormat::clear() ` from API level 29. (#449 )
5+ - media: Add bindings for ` AMediaCodecCryptoInfo ` , ` AMediaExtractor ` and ` AMediaDataSource ` . (#453 )
56
67# 0.8.0 (2023-10-15)
78
Original file line number Diff line number Diff line change 77use std:: {
88 ffi:: { CStr , CString } ,
99 io,
10+ ops:: Range ,
1011 os:: fd:: { FromRawFd , OwnedFd } ,
1112 ptr:: NonNull ,
1213} ;
@@ -321,3 +322,11 @@ pub struct OpenedFileDescriptor {
321322 pub offset : usize ,
322323 pub size : usize ,
323324}
325+
326+ impl OpenedFileDescriptor {
327+ /// Returns a range starting at [`OpenedFileDescriptor::offset`] with a length of
328+ /// [`OpenedFileDescriptor::size`].
329+ pub fn range ( & self ) -> Range < usize > {
330+ self . offset ..( self . offset + self . size )
331+ }
332+ }
You can’t perform that action at this time.
0 commit comments