mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Pass output media items's video size and frame count to MediaItemInfo
PiperOrigin-RevId: 722613631
This commit is contained in:
parent
4ed9abd05b
commit
35d5bd9675
@ -308,6 +308,16 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
if (exportResult.durationMs != C.TIME_UNSET) {
|
||||
mediaItemInfoBuilder.setDurationMillis(exportResult.durationMs);
|
||||
}
|
||||
mediaItemInfoBuilder.setVideoSampleCount(exportResult.videoFrameCount);
|
||||
Size videoSize =
|
||||
new Size(
|
||||
exportResult.width != C.LENGTH_UNSET
|
||||
? exportResult.width
|
||||
: MediaItemInfo.VALUE_UNSPECIFIED,
|
||||
exportResult.height != C.LENGTH_UNSET
|
||||
? exportResult.height
|
||||
: MediaItemInfo.VALUE_UNSPECIFIED);
|
||||
mediaItemInfoBuilder.setVideoSize(videoSize);
|
||||
if (exportResult.colorInfo != null) {
|
||||
mediaItemInfoBuilder.setVideoDataSpace(getVideoDataSpace(exportResult.colorInfo));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user