Skip to content

Commit e89d33a

Browse files
kggibsoncopybara-github
authored andcommitted
Trim with edit lists in InAppMP4Muxer
PiperOrigin-RevId: 757732509
1 parent 3ed1aba commit e89d33a

File tree

18 files changed

+1431
-50
lines changed

18 files changed

+1431
-50
lines changed

RELEASENOTES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
* Move `Muxer` interface from `media3-transformer` to `media3-muxer`.
2727
* Make setting `MediaItem.Builder().setImageDuration(long)` mandatory to
2828
import a media item as an image.
29+
* Add
30+
`Transformer.Builder().experimentalSetMp4EditListTrimEnabled(boolean)`
31+
which includes an MP4 edit list when trimming to instruct players to
32+
ignore samples between the key frame before the trim start point, and
33+
the trim start point.
2934
* Track Selection:
3035
* Extractors:
3136
* MP3: Use duration and data size from unseekable Xing, VBRI and similar
@@ -85,6 +90,8 @@
8590
* Muxers:
8691
* `writeSampleData()` API now uses muxer specific `BufferInfo` class
8792
instead of `MediaCodec.BufferInfo`.
93+
* Add `Muxer.Factory#supportsWritingNegativeTimestampsInEditList` which
94+
defaults to false.
8895
* IMA extension:
8996
* Fix a bug where a load error in one ad may accidentally invalidate
9097
another ad group.

libraries/muxer/src/main/java/androidx/media3/muxer/Muxer.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ interface Factory {
4141
* C.TrackType}.
4242
*/
4343
ImmutableList<String> getSupportedSampleMimeTypes(@C.TrackType int trackType);
44+
45+
/**
46+
* Whether the muxer supports writing negative timestamps into an edit list to instruct players
47+
* to ignore these samples.
48+
*/
49+
default boolean supportsWritingNegativeTimestampsInEditList() {
50+
return false;
51+
}
4452
}
4553

4654
/**

0 commit comments

Comments
 (0)