File tree 4 files changed +662
-0
lines changed
4 files changed +662
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
- Move ` MediaFormat ` from ` media::media_codec ` to its own ` media::media_format ` module. (#442 )
4
4
- media_format: Expose ` MediaFormat::copy() ` and ` MediaFormat::clear() ` from API level 29. (#449 )
5
+ - media: Add bindings for ` AMediaCodecCryptoInfo ` , ` AMediaExtractor ` and ` AMediaDataSource ` . (#453 )
5
6
6
7
# 0.8.0 (2023-10-15)
7
8
Original file line number Diff line number Diff line change 7
7
use std:: {
8
8
ffi:: { CStr , CString } ,
9
9
io,
10
+ ops:: Range ,
10
11
os:: fd:: { FromRawFd , OwnedFd } ,
11
12
ptr:: NonNull ,
12
13
} ;
@@ -321,3 +322,11 @@ pub struct OpenedFileDescriptor {
321
322
pub offset : usize ,
322
323
pub size : usize ,
323
324
}
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