mirror of
https://github.com/androidx/media.git
synced 2025-05-17 12:39:52 +08:00
Document motion photo imageDurationMs
changes
Added documentation and release notes for using `imageDurationMs` to determine image asset loading in `DefaultAssetLoaderFactory`. PiperOrigin-RevId: 756228166
This commit is contained in:
parent
f5ff9672e2
commit
30f645e073
@ -23,6 +23,8 @@
|
||||
`EditedMediaItemSequence.Builder`. If the gap is in the middle of the
|
||||
sequence, then this flag is not required.
|
||||
* Move `Muxer` interface from `media3-transformer` to `media3-muxer`.
|
||||
* Make setting `MediaItem.Builder().setImageDuration(long)` mandatory to
|
||||
import a media item as an image.
|
||||
* Track Selection:
|
||||
* Extractors:
|
||||
* MP3: Use duration and data size from unseekable Xing, VBRI and similar
|
||||
|
@ -191,6 +191,9 @@ public final class DefaultAssetLoaderFactory implements AssetLoader.Factory {
|
||||
MediaItem mediaItem = editedMediaItem.mediaItem;
|
||||
if (isImage(context, mediaItem)
|
||||
&& checkNotNull(mediaItem.localConfiguration).imageDurationMs != C.TIME_UNSET) {
|
||||
// Checks that mediaItem.localConfiguration.imageDurationMs is explicitly set.
|
||||
// This is particularly important for motion photos, where setting imageDurationMs ensures
|
||||
// that the motion photo is handled as an image.
|
||||
if (imageAssetLoaderFactory == null) {
|
||||
imageAssetLoaderFactory = new ImageAssetLoader.Factory(context, bitmapLoader);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user